Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Config ¶
Config registers a configuration value. This must be done before calling Load() Val can be: - func (T, error) - chan T - *T T may be anything supported by https://github.com/go-ini/ini Prefix should be a non-empty string for the table name defStr should contain valid TOML that is used as the default Such as `# Enable my key enable = true ` Note their is no table, and a trailing newline
func Load ¶
func Load(path string)
Load should be called with a path to the config directory It should contain a config.ini and will be created as necesary All Config calls should be done. Path and OpenFile can be called after this
func OpenFile ¶
OpenFile will take a name relative to the config Root as passed to Load and update var accordingly. Val can be: - func (T, error) - chan T - *T T may be: - struct{} - *os.File - string - []byte - interface{} which will be JSON decoded
func OpenFileDefault ¶
OpenFileDefault is like OpenFile but will fill the file with the contents of default if it doesn't exists or is empty
Types ¶
This section is empty.