package ini
import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini"
Package ini provides functions for parsing INI configuration files.
Index ¶
- type ErrSyntax
- type File
- func Load(in io.Reader) (File, error)
- func LoadFile(filename string) (File, error)
- func (f File) Get(section, key string) (value string, ok bool)
- func (f File) Load(in io.Reader) (err error)
- func (f File) LoadFile(file string) (err error)
- func (f File) Section(name string) Section
- type Section
Types ¶
type ErrSyntax ¶
type ErrSyntax struct { Line int Source string // The contents of the erroneous line, without leading or trailing whitespace }
ErrSyntax is returned when there is a syntax error in an INI file.
func (ErrSyntax) Error ¶
type File ¶
A File represents a parsed INI file.
func Load ¶
Loads and returns a File from a reader.
func LoadFile ¶
Loads and returns an INI File from a file on disk.
func (File) Get ¶
Looks up a value for a key in a section and returns that value, along with a boolean result similar to a map lookup.
func (File) Load ¶
Loads INI data from a reader and stores the data in the File.
func (File) LoadFile ¶
Loads INI data from a named file and stores the data in the File.
func (File) Section ¶
Returns a named Section. A Section will be created if one does not already exist for the given name.
type Section ¶
A Section represents a single section of an INI file.
Source Files ¶
ini.go
- Version
- v0.10.0
- Published
- Feb 3, 2015
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 1 minute ago –
Tools for package owners.