config

package
v1.2.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(receiver any, path string) (err error)

LoadConfig 从指定路径加载配置到 receiver 中,通过文件扩展名自动识别配置文件类型,支持 yaml、json、xml

func LoadConfigWithKeys

func LoadConfigWithKeys(receiver any, path string, keys ...string) (err error)

LoadConfigWithKeys 从指定路径加载配置到 receiver 中,只加载指定的配置项,通过文件扩展名自动识别配置文件类型,支持 yaml、json

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL