avyos.dev/pkg/ini
package ini
Package 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
func NewConfig() *Configfunc Parse(r io.Reader) (*Config, error)func ParseFile(filepath string) (*Config, error)Methods
func (c *Config) Delete(section, key string) boolfunc (c *Config) ForEachKey(section string, fn func(key, value string))func (c *Config) Get(section, key string) (string, bool)func (c *Config) Move(section, key string, newIndex int) boolfunc (c *Config) Set(section, key, value string)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
const (
EntryBlank EntryType = iota
EntryComment
EntrySection
EntryKeyValue
)Section
type Section struct {
Name string
Entries []*Entry
}