18 lines
354 B
Go
18 lines
354 B
Go
|
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}
|
||
|
}
|