config

package
v0.0.0-...-5e7ce8a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func (*Config) Bool

func (cf *Config) Bool(path string) (ok bool)

Get Bool value

func (*Config) Get

func (cf *Config) Get(path string) (value string)

Returns value for a key in a section

func (*Config) Integer

func (cf *Config) Integer(path string) (value int)

Get Int value

func (*Config) Load

func (cf *Config) Load(file string) (err error)

Load config file

func (*Config) Section

func (cf *Config) Section(name string) Section

Get named section

func (*Config) Set

func (cf *Config) Set(path string, value string) (err error)

Set value for a key in a section

func (*Config) SetMany

func (cf *Config) SetMany(values map[string]string) (err error)

Set value for a key in a section

type ConfigError

type ConfigError struct {
	Line   int
	Source string
}

Config is returned when there is a syntax error in an INI file

func (*ConfigError) Error

func (e *ConfigError) Error() string

type Section

type Section map[string]string

A section represents a single section of an INI file

Jump to

Keyboard shortcuts

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