Documentation ¶
Index ¶
- Constants
- Variables
- func ConfName() string
- func ErrConfKeyType(key, dataType string) error
- func ErrConfMissingKey(key, dataType string) error
- func ErrMissConfigAliasMap(detailKeys string) error
- func GetConfigDir(app string) (dir string, err error)
- func Init(cflag, app, default_conf string)
- func Load(conf interface{}) (err error)
- func LoadData(conf interface{}, data []byte) (err error)
- func LoadEx(conf interface{}, confName string) (err error)
- func LoadFile(conf interface{}, confName string) (err error)
- type AliasKey
- type MapConf
- func (conf MapConf) Get(key string) (interface{}, error)
- func (c MapConf) GetAliasList(key string) (aks []AliasKey, err error)
- func (conf MapConf) GetAliasMap(key string) (map[string]string, error)
- func (conf MapConf) GetAliasMapOr(key string, deft map[string]string) (map[string]string, error)
- func (conf MapConf) GetBool(key string) (bool, error)
- func (conf MapConf) GetBoolOr(key string, deft bool) (bool, error)
- func (conf MapConf) GetInt(key string) (int, error)
- func (conf MapConf) GetInt64(key string) (int64, error)
- func (conf MapConf) GetInt64Or(key string, deft int64) (int64, error)
- func (conf MapConf) GetIntOr(key string, deft int) (int, error)
- func (conf MapConf) GetString(key string) (string, error)
- func (conf MapConf) GetStringList(key string) ([]string, error)
- func (conf MapConf) GetStringListOr(key string, deft []string) ([]string, error)
- func (conf MapConf) GetStringOr(key string, deft string) (string, error)
Constants ¶
View Source
const ( StringType = "string" IntType = "int" Int64Type = "int64" BoolType = "bool" StringListType = "[]string" AliasMapType = "[string string, string]" )
conf types
Variables ¶
View Source
var ( NL = []byte{'\n'} ANT = []byte{'#'} )
View Source
var ErrHomeNotFound = errors.New("$HOME not found")
Functions ¶
func ErrConfKeyType ¶
func ErrConfMissingKey ¶
func ErrMissConfigAliasMap ¶
func GetConfigDir ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.