env:这个库用于处理Golang中的环境变量

时间:2021-04-30 22:55:43
【文件属性】:
文件名称:env:这个库用于处理Golang中的环境变量
文件大小:4KB
文件格式:ZIP
更新时间:2021-04-30 22:55:43
Go 环保 这个库用于处理Golang中的环境变量。 CONFIG_APP=ENVAPP CONFIG_DEBUG=1 CONFIG_HOSTS=192.168.0.1,127.0.0.1 CONFIG_TIMEOUT=5s CONFIG_REDISVERSION=3.2 CONFIG_REDIS_HOST=rdb CONFIG_REDIS_PORT=6379 CONFIG_MYSQL_HOST=mysqldb CONFIG_MYSQL_PORT=3306 import ( "fmt" "time" "os" "github.com/timest/env" ) type config struct { App string Port int `default:"8000"` IsDebug bool `env:"DEBUG"` Hosts [
【文件预览】:
env-master
----.gitignore(256B)
----env.go(5KB)
----Readme.md(2KB)
----env_test.go(2KB)

网友评论