Documentation ¶
Overview ¶
Package config provides for parse config file.
Index ¶
- type Config
- func (this *Config) Clear()
- func (this *Config) GlobalContent() map[string]string
- func (this *Config) GlobalGet(key string) string
- func (this *Config) GlobalGetDeadline(key string) time.Time
- func (this *Config) GlobalGetDuration(key string) time.Duration
- func (this *Config) GlobalGetInt(key string) int
- func (this *Config) GlobalGetInt64(key string) int64
- func (this *Config) GlobalGetSlice(key string, separator string) []string
- func (this *Config) GlobalGetSliceInt(key string, separator string) []int
- func (this *Config) GlobalHas(key string) bool
- func (this *Config) GlobalSet(key string, value string)
- func (this *Config) HasSection(section string) bool
- func (this *Config) Load(configFile string) *Config
- func (this *Config) LoadString(s string) error
- func (this *Config) Save(configFile string) error
- func (this *Config) SectionContent(section string) map[string]string
- func (this *Config) SectionContents() map[string]map[string]string
- func (this *Config) SectionGet(section string, key string) string
- func (this *Config) SectionGetDuration(section string, key string) time.Duration
- func (this *Config) SectionGetInt(section string, key string) int
- func (this *Config) SectionGetSlice(section string, key string, separator string) []string
- func (this *Config) SectionHas(section string, key string) bool
- func (this *Config) SectionSet(section string, key string, value string)
- func (this *Config) Sections() []string
- func (this *Config) String() string
- func (this *Config) StringWithMeta() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) GlobalContent ¶
func (*Config) GlobalGetInt ¶
func (*Config) GlobalGetInt64 ¶
func (*Config) GlobalGetSlice ¶
func (*Config) GlobalGetSliceInt ¶
func (*Config) HasSection ¶
func (*Config) LoadString ¶
func (*Config) SectionContent ¶
func (*Config) SectionGetDuration ¶
func (*Config) SectionGetSlice ¶
func (*Config) SectionSet ¶
func (*Config) StringWithMeta ¶
Click to show internal directories.
Click to hide internal directories.