Documentation ¶
Index ¶
- func GetBool(key string) bool
- func GetFopsServer() string
- func GetInt(key string) int
- func GetInt64(key string) int64
- func GetSlice(key string) []string
- func GetSliceNodes(key string) []map[string]any
- func GetString(key string) string
- func GetStrings(key string) []string
- func GetSubNodes(key string) map[string]any
- func InitConfig()
- func NewEnvConfig() *envConfig
- func NewYamlConfig(configFile string) *yamlConfig
- func ParseConfig[TConfig any](key string) TConfig
- func ParseConfigs[TConfig any](key string) []TConfig
- func ParseString[TConfig any](configString string) TConfig
- func SetDefault(key string, value any)
- type IConfigProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSliceNodes ¶ added in v0.6.0
GetSliceNodes 获取数组节点
func NewEnvConfig ¶ added in v0.4.0
func NewEnvConfig() *envConfig
func NewYamlConfig ¶ added in v0.4.0
func NewYamlConfig(configFile string) *yamlConfig
func ParseConfigs ¶ added in v0.6.0
ParseConfigs 将配置转换成数组对象
func ParseString ¶ added in v0.6.0
ParseString 解析字符串,转成配置对象
Types ¶
type IConfigProvider ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.