config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptySection = Section{*ini.Empty(ini.LoadOptions{AllowBooleanKeys: true}).Section("")}

Functions

func GetKeyValue

func GetKeyValue(myCnf *ini.Section, option string) (string, error)

GetKeyValue retrieves the string value of the given option from an ini section.

func ParseSection

func ParseSection(myCnfFile io.ReadCloser, sectionName string) (*ini.Section, error)

ParseSection loads an ini file and returns the named section.

Types

type NewSectionOpts added in v1.3.0

type NewSectionOpts struct {
	SectionName string
	Section     *ini.Section
}

type Section added in v1.3.0

type Section struct {
	ini.Section
}

Section is a wrapper around ini.Section to provide additional methods.

func NewSection added in v1.3.0

func NewSection(o NewSectionOpts) (*Section, error)

func (*Section) Changed added in v1.3.0

func (a *Section) Changed(b Section) []string

Changed returns a list of keys that are present in both, but have different values.

func (*Section) FromJSON added in v1.3.0

func (s *Section) FromJSON(in io.Reader, sectionName string) error

func (*Section) IntoJSON added in v1.3.0

func (s *Section) IntoJSON() ([]byte, error)

func (*Section) Subtract added in v1.3.0

func (a *Section) Subtract(b Section) []string

Subtract returns a list of keys that are present in a but not in b.

Jump to

Keyboard shortcuts

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