Documentation ¶
Index ¶
- Constants
- type INI
- func (ini *INI) Get(key string) (value string)
- func (ini *INI) GetBool(key string) bool
- func (ini *INI) GetDirectory() string
- func (ini *INI) GetFileName() string
- func (ini *INI) GetFloat32(key string) (float32, error)
- func (ini *INI) GetFloat64(key string) (float64, error)
- func (ini *INI) GetInt(key string) (int, error)
- func (ini *INI) GetInt64(key string) (int64, error)
- func (ini *INI) GetKeys(section string) KeySlice
- func (ini *INI) GetSections() []string
- func (ini *INI) Load(filename string) error
- func (ini *INI) LoadByte(data []byte, lineSep, kvSep string) error
- func (ini *INI) LoadReader(r io.Reader, lineSep, kvSep string) error
- func (ini *INI) ReLoad() error
- func (ini *INI) SectionBool(section, key string) bool
- func (ini *INI) SectionFloat32(section, key string) (float32, error)
- func (ini *INI) SectionFloat64(section, key string) (float64, error)
- func (ini *INI) SectionGet(section, key string) (value string)
- func (ini *INI) SectionInt(section, key string) (int, error)
- func (ini *INI) SectionInt64(section, key string) (int64, error)
- func (ini *INI) SectionSet(section, key string, value interface{})
- func (ini *INI) Set(key string, value interface{})
- func (ini *INI) SetDirectory(dir string)
- func (ini *INI) SetFileName(filename string)
- func (ini *INI) SetSectionMap(sectionMap SectionMap)
- func (ini *INI) Write(w io.Writer) error
- func (ini *INI) WriteFile(filename, content string) (n int, err error)
- func (ini *INI) WriteOriginFile() error
- type Key
- type KeySlice
- type SectionMap
Constants ¶
View Source
const ( //DefaultSection default section name DefaultSection = "" //DefaultLineSeparator default line sep DefaultLineSeparator = "\n" //DefaultKeyValueSeparator default k=v eeq DefaultKeyValueSeparator = "=" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type INI ¶
type INI struct {
// contains filtered or unexported fields
}
INI ini struct
func (*INI) GetDirectory ¶ added in v0.0.2
GetDirectory return config file directory
func (*INI) GetFileName ¶ added in v0.0.2
GetFileName GetFileName
func (*INI) LoadReader ¶
LoadReader load io reader to ini data
func (*INI) SectionBool ¶
SectionBool get bool value
func (*INI) SectionFloat32 ¶
SectionFloat32 get float32 value
func (*INI) SectionFloat64 ¶
SectionFloat64 returns float64
func (*INI) SectionGet ¶
SectionGet return value
func (*INI) SectionInt64 ¶
SectionInt64 returns int64
func (*INI) SectionSet ¶ added in v0.1.0
SectionSet set section -> key ->value
func (*INI) SetDirectory ¶ added in v0.0.2
SetDirectory set config file directory
func (*INI) SetFileName ¶ added in v0.0.2
SetFileName SetFileName
func (*INI) SetSectionMap ¶ added in v0.0.9
func (ini *INI) SetSectionMap(sectionMap SectionMap)
SetSectionMap set ini sectionMap
func (*INI) WriteOriginFile ¶ added in v0.0.5
WriteOriginFile rewrite the origin file
Click to show internal directories.
Click to hide internal directories.