common.go
335 字节
package constant
import (
"fmt"
"os"
)
var SERVICE_NAME = "allied-creation-user"
var SERVICE_ENV = "dev"
var CACHE_PREFIX = "allied-creation-user-dev"
var LOG_LEVEL = "debug"
func init() {
if os.Getenv("LOG_LEVEL") != "" {
LOG_LEVEL = os.Getenv("LOG_LEVEL")
}
CACHE_PREFIX = fmt.Sprintf("%v-%v", SERVICE_NAME, SERVICE_ENV)
}