Documentation
¶
Overview ¶
cache ini to memory
read ini directly from file
read ini from file
Index ¶
- type File
- func (f *File) Bool(section, key string) bool
- func (f *File) Duration(section, key string) time.Duration
- func (f *File) Float64(section, key string) float64
- func (f *File) Int(section, key string) int
- func (f *File) Int64(section, key string) int64
- func (f *File) String(section, key string) string
- func (f *File) Time(section, key string) time.Time
- func (f *File) TimeFormat(section, key, format string) time.Time
- func (f *File) Uint(section, key string) uint
- func (f *File) Uint64(section, key string) uint64
- type Ini
- type IniCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ini ¶
type Ini struct {
// contains filtered or unexported fields
}
用于省略前缀长路径写法 例如,以下可用于多语言处理: ini := NewIni(conf.RootDir()+"/app.default) lang := ".zh_cn" cfg := ini.GetFile(lang) cfg.String("msg", "1001")
func (*Ini) GetDefaultFile ¶
type IniCache ¶ added in v0.0.2
type IniCache struct {
// contains filtered or unexported fields
}
func NewIniCache ¶ added in v0.0.2
func NewTimeoutIniCache ¶ added in v0.0.3
rootPath -- point out the etc directory timeout -- reread init file afeter timeout
func (*IniCache) ClearCache ¶ added in v0.0.3
func (ini *IniCache) ClearCache()
func (*IniCache) GetDefaultFile ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.