cfg

package
v0.0.0-...-70285c8 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2016 License: MIT, MIT Imports: 6 Imported by: 0

README

cfg

simple ini config library

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrInvalidCfgFile

func ErrInvalidCfgFile(cfgFile string) error

func ErrNotExists

func ErrNotExists(fieldName string) error

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