ini

package module
v0.0.0-...-fd3024d Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2016 License: MIT Imports: 9 Imported by: 11

README

goini

INI file parser in go.

See Also

For real apps, you can use TOML instead, which is a better INI format :-)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(filename string, dict *Dict) error

Types

type Dict

type Dict map[string]map[string]string

func Load

func Load(filename string) (Dict, error)

func LoadReader

func LoadReader(reader *bufio.Reader) (dict Dict, err error)

func MustLoad

func MustLoad(filename string) Dict

func MustLoadReader

func MustLoadReader(reader *bufio.Reader) Dict

func (Dict) Delete

func (dict Dict) Delete(section, key string)

func (Dict) GetBool

func (dict Dict) GetBool(section, key string) (bool, bool)

func (Dict) GetDouble

func (dict Dict) GetDouble(section, key string) (float64, bool)

func (Dict) GetInt

func (dict Dict) GetInt(section, key string) (int, bool)

func (Dict) GetSections

func (dict Dict) GetSections() []string

func (Dict) GetString

func (dict Dict) GetString(section, key string) (string, bool)

func (Dict) SetBool

func (dict Dict) SetBool(section, key string, value bool)

func (Dict) SetDouble

func (dict Dict) SetDouble(section, key string, value float64)

func (Dict) SetInt

func (dict Dict) SetInt(section, key string, value int)

func (Dict) SetString

func (dict Dict) SetString(section, key, value string)

func (Dict) String

func (dict Dict) String() string

type Error

type Error string

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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