Documentation
¶
Overview ¶
Package config
Program can get Opts from:
- Command line flags
- config.ini Types of lines: * # - comment * some option=value of the option
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Opts struct { // Port for website (with ':') Port string `default:":500" name:"port" comment:"Port for website"` // Debug mode Debug bool `default:"false" name:"debug"` // Offset - number of records on single screen Offset int `default:"100" name:"offset" comment:"number of records on a single screen"` // CheckVer - should the program check check is there a new version CheckVer bool `default:"true" name:"should_check_version"` // OpenBrowser - should the program open a browser automatically OpenBrowser bool `default:"true" name:"open_browser"` // NeatWindow - should the program open the special neat window NeatWindow bool `default:"true" name:"open_neat_window" comment:"has effect only if 'open browser' is true"` }
Opts keeps vars for global use
Tags: * default - default value * name - name in the file config.ini * comment - comment in the file config.ini
Functions ¶
func ParseConfig ¶
func ParseConfig() (err error)
ParseConfig parses flags like -port, -debug, -offset and etc. If there's no any flags, it tries to parse config file "config.ini"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.