configutils

package
v0.0.0-...-909db3f Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: MIT Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

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