conf

package
v0.0.0-...-079d604 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Tree represents the TOML configuration tree for the application
	Tree *toml.TomlTree
)

Functions

func Get

func Get(key string) interface{}

Get returns the value for the key specified.

func GetDefault

func GetDefault(key string, def interface{}) interface{}

GetDefault returns the value for the key specified, or "def" if not found.

func Has

func Has(key string) bool

Has checks whether the key specified was found in the tree.

func Keys

func Keys() []string

Keys return the list of keys in the TOML tree.

func Query

func Query(query string) (*toml.QueryResult, error)

Query queries the TOML tree and returns its result.

func Set

func Set(key string, value interface{})

Set sets a value in the TOML tree.

func String

func String() string

String returns the TOML tree as a string.

func ToMap

func ToMap() map[string]interface{}

ToMap returns the TOML tree as a map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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