作者 yangfu

环境变量修改

@@ -40,5 +40,8 @@ func init() { @@ -40,5 +40,8 @@ func init() {
40 CUSTOMER_ACCOUNT = tmpAccounts 40 CUSTOMER_ACCOUNT = tmpAccounts
41 } 41 }
42 } 42 }
  43 + if os.Getenv("SERVICE_ENV") != "" {
  44 + SERVICE_ENV = os.Getenv("SERVICE_ENV")
  45 + }
43 CACHE_PREFIX = fmt.Sprintf("%v-%v", SERVICE_NAME, SERVICE_ENV) 46 CACHE_PREFIX = fmt.Sprintf("%v-%v", SERVICE_NAME, SERVICE_ENV)
44 } 47 }
1 package constant 1 package constant
2 2
3 -import "os" 3 +import (
  4 + "os"
  5 +)
4 6
5 var POSTGRESQL_DB_NAME = "terms" 7 var POSTGRESQL_DB_NAME = "terms"
6 var POSTGRESQL_USER = "postgres" 8 var POSTGRESQL_USER = "postgres"