Documentation
¶
Index ¶
- Variables
- func LoadConfig(receiver any, path string) (err error)
- func LoadConfigWithKeys(receiver any, path string, keys ...string) (err error)
- func LoadEmbedConfig(receiver any, fs embed.FS, name string) (err error)
- func LoadEmbedConfigWithKeys(receiver any, fs embed.FS, name string, keys ...string) (err error)
- func WriteConfig(path string, object any) (err error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func LoadConfig ¶
LoadConfig 从指定路径加载配置到 receiver 中,通过文件扩展名自动识别配置文件类型,支持 yaml、json、xml
func LoadConfigWithKeys ¶
LoadConfigWithKeys 从指定路径加载配置到 receiver 中,只加载指定的配置项,通过文件扩展名自动识别配置文件类型,支持 yaml、json
func LoadEmbedConfig ¶ added in v1.2.15
func LoadEmbedConfigWithKeys ¶ added in v1.2.15
func WriteConfig ¶ added in v1.2.15
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.