Skip to content

Commit

Permalink
chore: optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 committed Jul 2, 2021
1 parent ebfb53a commit 92eeef1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/internal/conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ func InitConf() {
}

setupConfig()

setEnvironment()
setupEnv()
initSchema()
}

Expand Down Expand Up @@ -195,7 +194,7 @@ func setupConfig() {
SSLKey = config.Conf.SSL.Key
}

// for etcd
// ETCD Storage
if len(config.Conf.Etcd.Endpoints) > 0 {
initEtcdConfig(config.Conf.Etcd)
}
Expand Down Expand Up @@ -243,13 +242,14 @@ func setupConfig() {
// set degree of parallelism
initParallelism(config.Conf.MaxCpu)

// auth
// set authentication
initAuthentication(config.Authentication)

// set plugin
initPlugins(config.Plugins)
}

func setEnvironment() {
func setupEnv() {
ENV = EnvPROD
if env := os.Getenv("ENV"); env != "" {
ENV = env
Expand Down

0 comments on commit 92eeef1

Please sign in to comment.