Documentation ¶
Index ¶
- Variables
- func Get(key string) interface{}
- func GetBoolean(key string) (bool, bool)
- func GetBooleanDefault(key string, dv bool) bool
- func GetBytes(key string) ([]byte, bool)
- func GetBytesDefault(key string, dv []byte) []byte
- func GetFloat(key string) (float64, bool)
- func GetInt(key string) (int64, bool)
- func GetInt64Default(key string, dv int64) int64
- func GetIntDefault(key string, dv int) int
- func GetMust(key string) interface{}
- func GetString(key string) string
- func GetStringDefault(key, def string) string
- func GetStringMust(key string) string
- func ReadCfg(fn string) error
- func Scan(key string, dest interface{}) (err error)
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var (
KeyNotExist = errors.New("key not exist")
)
Functions ¶
func GetBoolean ¶
func GetBooleanDefault ¶
func GetBytesDefault ¶
func GetInt64Default ¶
func GetIntDefault ¶
func GetStringDefault ¶
GetString Get string type by key, if key not exist, return the default
func GetStringMust ¶
GetString Get string type by key, if not exist, panic
Types ¶
Click to show internal directories.
Click to hide internal directories.