1 Star 0 Fork 0

csingo / cHelper

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
Env.go 410 Bytes
Copy Edit Raw Blame History
chenxuyi authored 2022-07-14 09:54 +08:00 . update
package cHelper
import "os"
func EnvToInt(name string, value int) int {
env := os.Getenv(name)
if env == "" {
return value
}
return ToInt(env)
}
func EnvToBool(name string, value bool) bool {
env := os.Getenv(name)
if env == "" {
return value
}
return ToBool(env)
}
func EnvToString(name string, value string) string {
env := os.Getenv(name)
if env == "" {
return value
}
return env
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/csingo/cHelper.git
git@gitee.com:csingo/cHelper.git
csingo
cHelper
cHelper
v0.4.35

Search