conf

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close added in v0.6.4

func Close()

func Init

func Init(file string)

func Wait added in v0.6.4

func Wait()

Types

type Any added in v0.6.4

type Any = interface{}

type Conf

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

func New

func New(data Any) *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) Close added in v0.6.4

func (conf *Conf) Close()

func (*Conf) Context added in v0.6.4

func (conf *Conf) Context() context.Context

func (*Conf) Daemon added in v0.6.4

func (conf *Conf) Daemon(name string, cb func(context.Context))

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 ...Any) Any

func (*Conf) Sub added in v0.6.4

func (conf *Conf) Sub(key string) *Conf

func (*Conf) Wait added in v0.6.4

func (conf *Conf) Wait()

Jump to

Keyboard shortcuts

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