Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
chore: load .env instead of .env.local
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Jun 3, 2021
1 parent 72ed8e1 commit 487a737
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/app/config.go
Expand Up @@ -47,12 +47,11 @@ type GCSConfig struct {
}

func ReadConfig(debug bool) (*Config, error) {
if debug {
// .env.local file is only available in debug environment
if err := godotenv.Load(".env.local"); err != nil && !os.IsNotExist(err) {
return nil, err
}
log.Infof("config: .env.local loaded")
// load .env
if err := godotenv.Load(".env"); err != nil && !os.IsNotExist(err) {
return nil, err
} else if err == nil {
log.Infof("config: .env loaded")
}

var c Config
Expand Down

0 comments on commit 487a737

Please sign in to comment.