Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfigFromFile ¶
func LoadConfigFromFile(fn string, configType ConfigType, value interface{}, opts ...viper.DecoderConfigOption) error
LoadConfigFromFile 从文件中读取配置
Types ¶
type ConfigType ¶
type ConfigType string
const ( ConstConfigTypeYaml ConfigType = "yaml" ConstConfigTypeJson ConfigType = "json" ConstConfigTypeToml ConfigType = "toml" )
func (ConfigType) String ¶
func (t ConfigType) String() string
Click to show internal directories.
Click to hide internal directories.