Versions in this module Expand all Collapse all v2 v2.0.1 Mar 30, 2023 Changes in this version + const DefSection + const ModeFull + const ModeLite + const ModeSimple + const TokSection + var TagName = "ini" + func Decode(blob []byte, ptr any) error + func Encode(v any) ([]byte, error) + func EncodeFull(data map[string]any, defSection ...string) (out []byte, err error) + func EncodeLite(data map[string]map[string]string, defSection ...string) (out []byte, err error) + func EncodeSimple(data map[string]map[string]string, defSection ...string) ([]byte, error) + func EncodeWithDefName(v any, defSection ...string) (out []byte, err error) + func IgnoreCase(p *Parser) + func InlineComment(opt *Options) + func NoDefSection(p *Parser) + func WithReplaceNl(opt *Options) + type OptFunc func(opt *Options) + func WithDefSection(name string) OptFunc + func WithParseMode(mode parseMode) OptFunc + func WithTagName(name string) OptFunc + type Options struct + Collector UserCollector + DefSection string + IgnoreCase bool + InlineComment bool + NoDefSection bool + ParseMode parseMode + ReplaceNl bool + TagName string + func NewOptions(fns ...OptFunc) *Options + type Parser struct + func New(fns ...OptFunc) *Parser + func NewFulled(fns ...func(*Parser)) *Parser + func NewLite(fns ...OptFunc) *Parser + func NewSimpled(fns ...func(*Parser)) *Parser + func Parse(data string, mode parseMode, opts ...func(*Parser)) (p *Parser, err error) + func (p *Parser) Comments() map[string]string + func (p *Parser) Decode(ptr any) error + func (p *Parser) FullData() map[string]any + func (p *Parser) LiteData() map[string]map[string]string + func (p *Parser) LiteSection(name string) map[string]string + func (p *Parser) MapStruct(ptr any) (err error) + func (p *Parser) ParseBytes(bts []byte) (err error) + func (p *Parser) ParseFrom(in *bufio.Scanner) (count int64, err error) + func (p *Parser) ParseReader(r io.Reader) (err error) + func (p *Parser) ParseString(str string) error + func (p *Parser) ParsedData() any + func (p *Parser) Reset() + func (p *Parser) SimpleData() map[string]map[string]string + func (p *Parser) Unmarshal(v []byte, ptr any) error + func (p *Parser) WithOptions(opts ...func(p *Parser)) *Parser + type SectionMatcher struct + func (m *SectionMatcher) Match(text string, _ textscan.Token) (textscan.Token, error) + type UserCollector func(section, key, val string, isSlice bool)