Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Unmarshal ¶
func Unmarshal(r io.Reader, v interface{}, tp ConfigType) error
Unmarshal support json/toml/yaml. Notice: yaml should use tag `yaml:"key"`
func UnmarshalFile ¶
func UnmarshalFile(fPath string, v interface{}, tp ConfigType) error
UnmarshalFile support json/toml/yaml. Notice: yaml should use tag `yaml:"key"`
Types ¶
type ConfigType ¶
type ConfigType string
const ( ConfigTypeJSON ConfigType = "json" ConfigTypeTOML ConfigType = "toml" ConfigTypeYAML ConfigType = "yaml" )
func DetechFileConfigType ¶
func DetechFileConfigType(fname string) ConfigType
Click to show internal directories.
Click to hide internal directories.