Gob 框架Gob 框架
主页
快速开始
使用文档
服务提供者
提供命令
Github
主页
快速开始
使用文档
服务提供者
提供命令
Github
    • gob:app
    • gob:cache
    • gob:config
    • gob:distributed
    • gob:env
    • gob:id
    • gob:kernel
    • gob:log
    • gob:orm
    • gob:redis
    • gob:sls
    • gob:ssh
    • gob:trace

gob:env

服务介绍:

提供环境变量相关方法

支持命令:

app

支持配置:无

提供方法:

type Env interface {
	// AppEnv 获取当前的环境,建议分为 dev/test/prod
	AppEnv() string
	// IsExist 判断一个环境变量是否有被设置
	IsExist(string) bool
	// Get 获取某个环境变量,如果没有设置,返回""
	Get(string) string
	// All 获取所有的环境变量,.env 和运行环境变量融合后结果
	All() map[string]string
}
Last Updated:
Contributors: 陈壁浩
Prev
gob:distributed
Next
gob:id