Documentation ¶
Index ¶
- func Any(key string) (interface{}, error)
- func C(key string) (string, error)
- func CB(key string) (bool, error)
- func CF32(key string) (float32, error)
- func CF64(key string) (float64, error)
- func CI(key string) (int, error)
- func CI32(key string) (int32, error)
- func CI64(key string) (int64, error)
- func D(key, def string) string
- func DB(key string, def bool) bool
- func DF32(key string, def float32) float32
- func DF64(key string, def float64) float64
- func DI(key string, def int) int
- func DI32(key string, def int32) int32
- func DI64(key string, def int64) int64
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config interface { // LoadJSON 从 bytes 数据中读取配置 LoadJSON(bytes []byte) error // LoadTOML 从 bytes 数据中读取配置 LoadTOML(bytes []byte) error // LoadYAML 从 bytes 数据中读取配置 LoadYAML(bytes []byte) error // FileJSON 从 json 文件中读取配置 FileJSON(path string) error // FileTOML 从 toml 文件中读取配置 FileTOML(path string) error // FileYAML 从 yaml 文件中读取配置 FileYAML(path string) error // Any 根据 key 获取对应数据 Any(key string) (interface{}, error) }
Config 配置文件
Click to show internal directories.
Click to hide internal directories.