common.go 797 字节
package constant

import "os"

const SERVICE_NAME = "partnermg"

var LOG_LEVEL = "debug"
var LOG_File = "./logs/partnermg.log"

var (
	UCENTER_HOST      = "http://suplus-ucenter-dev.fjmaimaimai.com" //统一用户中心地址
	UCENTER_SECRET    = "cykbjnfqgctn"
	UCENTER_APP_KEY   = "39aefef9e22744a3b2d2d3791824ae7b"
	UCENTER_CHECK_ALT = "rsF0pL!6DwjBO735"
)

func init() {
	if os.Getenv("LOG_LEVEL") != "" {
		LOG_LEVEL = os.Getenv("LOG_LEVEL")
	}
	if os.Getenv("UCENTER_HOST") != "" {
		LOG_LEVEL = os.Getenv("UCENTER_HOST")
	}
	if os.Getenv("UCENTER_SECRET") != "" {
		LOG_LEVEL = os.Getenv("UCENTER_SECRET")
	}
	if os.Getenv("UCENTER_APP_KEY") != "" {
		LOG_LEVEL = os.Getenv("UCENTER_APP_KEY")
	}
	if os.Getenv("UCENTER_CHECK_ALT") != "" {
		LOG_LEVEL = os.Getenv("UCENTER_CHECK_ALT")
	}

}