api/config/app_info.go

18 lines
350 B
Go

package config
import "api/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}
}