goini

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplementedYet = errors.New("Not implemented yet")
)

Functions

func LoadFiles

func LoadFiles(inifiles []string) (*ini.File, error)

LoadFiles parses a given set of ini files

func NewIni

func NewIni(inifiles []string) (parserIni.Ini, error)

func NewParser

func NewParser() parser.Parser

NewParser returns a new parser instance

Types

type Parser

type Parser struct {
	Config *ini.File
}

Parser implementation based on goini framework framework

func (*Parser) Close

func (parser *Parser) Close() error

Close releases any resources w.r.t the parser

func (*Parser) GetInt64Value

func (parser *Parser) GetInt64Value(section string, key string) (int64, error)

GetInt64Value retrieves the section value as int from the given Ini

func (*Parser) GetInt64ValueWithDefault

func (parser *Parser) GetInt64ValueWithDefault(section string, key string, defaultValue int64) int64

GetInt64ValueWithDefault retrieves the given [section]/key value

func (*Parser) GetSections

func (parser *Parser) GetSections() ([]string, error)

GetSections retrieves all sections

func (*Parser) GetValue

func (parser *Parser) GetValue(section string, key string) (string, error)

GetValue retrieves the section value from the given Ini

func (*Parser) GetValueWithDefault

func (parser *Parser) GetValueWithDefault(section string, key string, defaultValue string) string

GetValueWithDefault retrieves the given [section]/key value

func (*Parser) ParseFile

func (parser *Parser) ParseFile(confFile string, v interface{}) error

ParseFile parses a given file

func (*Parser) ParseFiles

func (parser *Parser) ParseFiles(files []string, v interface{}) error

ParseFiles parses a given set of files

Jump to

Keyboard shortcuts

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