支持YAML,JSON,TOML,Shell环境的Golang配置工具
支持YAML,JSON,TOML,Shell环境的Configor Golang配置工具(支持Go 1.10+)使用包主要导入(“ fmt”“ github.com/jinzhu/configor”)var Config = struct {APPName string`d Configor Golang Configuration支持YAML,JSON,TOML,Shell环境的工具(支持Go 1.10+)使用包主要导入(“ fmt”“ github.com/jinzhu/configor”)var Config = struct {APPName字符串`default:“ app name”` DB struct {名称字符串用户字符串`default:“ root”`密码字符串`required:“ true” env:“ DBPassword”`端口uint`default:“ 3306”`} Contacts [] struct {Name string电子邮件字符串`required: “ true”`}} {} func main(){configor.Loa