conf

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string, def ...string) string

func GetInt

func GetInt(key string, def ...int) int

func GetVal

func GetVal(key string, def ...interface{}) interface{}

func Init

func Init(file string)

Types

type Conf

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

func New

func New(data interface{}) *Conf

func Open

func Open(file string) (*Conf, error)

func Parse

func Parse(text string) (*Conf, error)

func Sub

func Sub(key string) *Conf

func (*Conf) Get

func (conf *Conf) Get(key string, def ...string) string

func (*Conf) GetBool

func (conf *Conf) GetBool(key string, def ...bool) bool

func (*Conf) GetDict

func (conf *Conf) GetDict(key string, def ...map[string]string) map[string]string

func (*Conf) GetInt

func (conf *Conf) GetInt(key string, def ...int) int

func (*Conf) GetList

func (conf *Conf) GetList(key string, def ...[]string) []string

func (*Conf) GetVal

func (conf *Conf) GetVal(key string, def ...interface{}) interface{}

Jump to

Keyboard shortcuts

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