config

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config holds globally available configuration variables which are either set by defaults, read from a config file or set by command line options.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfFile hold the path to the used config file (relative to working directory)
	ConfFile = "./config.toml"

	// LogLevel defines the general log level - can be overwritten by cmd line options or config file
	LogLevel = 5

	// SearchLogLevel defines the search log level - can be overwritten by cmd line options or config file
	SearchLogLevel = 5

	// TestLogLevel defines the test log level
	TestLogLevel = 5

	// Settings is the global configuration read in from file
	Settings conf
)

globally available config values.

View Source
var LogLevels = map[string]int{
	"off":      -1,
	"critical": 0,
	"error":    1,
	"warning":  2,
	"notice":   3,
	"info":     4,
	"debug":    5,
}

LogLevels mapping of string representations of log levels to numerical values.

Functions

func Setup

func Setup()

Setup reads configuration file and sets settings from this file or defaults to various aspects of the application. E.g. Search config, Eval config, etc.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL