cfg

package
v0.0.0-...-b131dfc Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2015 License: MIT, MIT Imports: 7 Imported by: 0

README

cfg

simple ini config library

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExists      = errors.New("no such field")
	ErrInvalidCfgFile = errors.New("invalid config file")
)

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	// contains filtered or unexported fields
}

func NewCfg

func NewCfg(filename string) *Cfg

func (*Cfg) Load

func (c *Cfg) Load() error

func (*Cfg) ReadInt

func (c *Cfg) ReadInt(k string, def int) (int, error)

func (*Cfg) ReadString

func (c *Cfg) ReadString(k string, def string) (string, error)

func (*Cfg) Save

func (c *Cfg) Save() error

func (*Cfg) WriteInt

func (c *Cfg) WriteInt(k string, val int)

func (*Cfg) WriteString

func (c *Cfg) WriteString(k string, val string)

Jump to

Keyboard shortcuts

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