gateway/config/app_info.go

18 lines
354 B
Go
Raw Normal View History

2021-09-07 14:25:39 +08:00
package config
import "gateway/utils"
type appInfo struct {
AppName string
Port uint64
JaegerServer string
}
func InitAppInfo() {
appName := utils.GetEnvVal("APP_NAME", "go-web")
port := utils.GetEnvIntVal("PORT", 8888)
jaegerServer := utils.GetEnvVal("JAEGER_SERVER", "")
AppInfo = appInfo{appName, uint64(port), jaegerServer}
}