common.go 620 字节
package constant

import "os"

const SERVICE_NAME = "mmm-worth"

var LOG_LEVEL = "debug"
var ABILITY_SERVICE_HOST = "https://suplus-worth-app-gateway-dev.fjmaimaimai.com"
var MMM_OPEN_API_SERVICE_HOST = "http://mmm-open-api-dev.fjmaimaimai.com"

//var LOG_LEVEL = "debug"
var LOG_File = "app.log"

func init() {
	if os.Getenv("LOG_LEVEL") != "" {
		LOG_LEVEL = os.Getenv("LOG_LEVEL")
	}
	if os.Getenv("ABILITY_SERVICE_HOST") != "" {
		ABILITY_SERVICE_HOST = os.Getenv("ABILITY_SERVICE_HOST")
	}
	if os.Getenv("MMM_OPEN_API_SERVICE_HOST") != "" {
		MMM_OPEN_API_SERVICE_HOST = os.Getenv("MMM_OPEN_API_SERVICE_HOST")
	}
}