avyos.dev/pkg/ini
package ini
Overview
No package-level documentation is provided.
| Export Group | Count |
|---|---|
| Constants | 0 |
| Variables | 0 |
| Functions | 0 |
| Types | 4 |
Types
Config
type Config struct {
Entries []*Entry
Sections map[string]*Section
}Functions
NewConfig
func NewConfig() *ConfigParse
func Parse(r io.Reader) (*Config, error)ParseFile
func ParseFile(filepath string) (*Config, error)Methods
Delete
func (c *Config) Delete(section, key string) boolForEachKey
func (c *Config) ForEachKey(section string, fn func(key, value string))Get
func (c *Config) Get(section, key string) (string, bool)Move
func (c *Config) Move(section, key string, newIndex int) boolSet
func (c *Config) Set(section, key, value string)Write
func (c *Config) Write(w io.Writer) errorEntry
type Entry struct {
Type EntryType
Section string
Key string
Value string
Raw string
Multiline bool
Lines []string
}EntryType
type EntryType uint8Constants
EntryBlank, EntryComment, EntrySection, EntryKeyValue
const (
EntryBlank EntryType = iota
EntryComment
EntrySection
EntryKeyValue
)Section
type Section struct {
Name string
Entries []*Entry
}