configfile

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapTo

func MapTo(cfg *ini.File, section string, v interface{}) error

func ParseKeyFromSectionString

func ParseKeyFromSectionString(path string, section string, key string) (string, error)

func RemoveFilesGlob

func RemoveFilesGlob(p string, pattern string, section string, key string, value string) error

func RemoveFilesSectionGlob

func RemoveFilesSectionGlob(p string, pattern string, section string, key string, value string) error

Types

type Meta

type Meta struct {
	Path    string
	Cfg     *ini.File
	Section *ini.Section
}

func Load

func Load(path string) (*Meta, error)

func (*Meta) GetKeySectionString

func (m *Meta) GetKeySectionString(section string, key string) string

func (*Meta) GetKeySectionUint

func (m *Meta) GetKeySectionUint(section string, key string) uint

func (*Meta) NewKeyToSectionString

func (m *Meta) NewKeyToSectionString(section string, key string, value string) error

func (*Meta) NewSection

func (m *Meta) NewSection(section string) error

func (*Meta) RemoveKeyFromSectionString

func (m *Meta) RemoveKeyFromSectionString(section string, key string, value string) error

func (*Meta) RemoveSection

func (m *Meta) RemoveSection(section string, key string, value string) error

func (*Meta) Save

func (m *Meta) Save() error

func (*Meta) SetKeySectionString

func (m *Meta) SetKeySectionString(section string, key string, value string) error

func (*Meta) SetKeySectionUint

func (m *Meta) SetKeySectionUint(section string, key string, value uint) error

func (*Meta) SetKeyToNewSectionString

func (m *Meta) SetKeyToNewSectionString(key string, value string)

func (*Meta) SetKeyToNewSectionUint

func (m *Meta) SetKeyToNewSectionUint(key string, value uint)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL