Documentation
¶
Overview ¶
Package cfg provides a simple facility for loading configuration file. If there is an error, it will panic because handling configuration file errors is meaningless.
Index ¶
- func Bool(x any) bool
- func ExecDir() string
- func Float(x any) float64
- func HomeDir() string
- func Int(x any) int
- func String(x any) string
- type Section
- func (a Section) BoolDict(key string) map[string]bool
- func (a Section) BoolList(key string) []bool
- func (a Section) BoolValue(key string) bool
- func (a Section) FloatDict(key string) map[string]float64
- func (a Section) FloatList(key string) []float64
- func (a Section) FloatValue(key string) float64
- func (a Section) IntDict(key string) map[string]int
- func (a Section) IntList(key string) []int
- func (a Section) IntValue(key string) int
- func (a Section) Section(key string) Section
- func (a Section) StringDict(key string) map[string]string
- func (a Section) StringList(key string) []string
- func (a Section) StringValue(key string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
Section represents a configuration section.
func (Section) FloatValue ¶
FloatValue returns float value by key.
func (Section) StringDict ¶
StringDict returns string dict by key.
func (Section) StringList ¶
StringList returns string list by key.
func (Section) StringValue ¶
StringValue returns string value by key.
Click to show internal directories.
Click to hide internal directories.