common.go 408 字节
package constant

import "os"

const SERVICE_NAME = "performance"

var LOG_LEVEL = "debug"

//过期时间 7天时间
var AdminJwtExpiresIn = int64(3600 * 24 * 7)

var AdminJWTSecretKey = "sg-storage"

// Env 判断当前环境变量
var Env = "dev"

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

	if os.Getenv("ENV_MOD") != "" {
		Env = os.Getenv("ENV_MOD")
	}
}