common.go 543 字节
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"

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")
	}
}