common.go 761 字节
package constant

import "os"

const SERVICE_NAME = "project"

var LOG_LEVEL = "debug"

//天联共创基础模块
var ALLIED_CREATION_BASIC_HOST = "http://localhost:8080"

//天联共创用户模块
var ALLIED_CREATION_USER_HOST = "http://localhost:8081"

//天联共创业务模块
var ALLIED_CREATION_COOPERATION_HOST = "http://localhost:8081"

//通用模块短信服务
var SMS_SERVE_HOST = "http://localhost:8081"

func init() {
	if os.Getenv("LOG_LEVEL") != "" {
		LOG_LEVEL = os.Getenv("LOG_LEVEL")
	}
	if os.Getenv("ALLIED_CREATION_BASIC_HOST") != "" {
		ALLIED_CREATION_BASIC_HOST = os.Getenv("ALLIED_CREATION_BASIC_HOST")
	}
	if os.Getenv("ALLIED_CREATION_USER_HOST") != "" {
		ALLIED_CREATION_USER_HOST = os.Getenv("ALLIED_CREATION_USER_HOST")
	}
}