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

Commit

Permalink
Refactor Root File For Readability
Browse files Browse the repository at this point in the history
  • Loading branch information
mainawycliffe committed Apr 12, 2020
1 parent f2e8567 commit 45df4f1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ func init() {
}

func initConfig() {
if cfgFile != "" {
viper.SetConfigFile(cfgFile)
} else {
if cfgFile == "" {
// Find home directory.
home, err := homedir.Dir()
if err != nil {
Expand All @@ -69,8 +67,8 @@ func initConfig() {
os.Exit(1)
}
cfgFile = configPath
viper.SetConfigFile(configPath)
}
viper.SetConfigFile(cfgFile)
viper.Set(configs.GoogleOAuthClientIDConfigKey, GOOGLE_OAUTH_CLIENT_ID)
viper.Set(configs.GoogleOAuthClientSecretConfigKey, GOOGLE_OAUTH_CLIENT_SECRET)
viper.AutomaticEnv()
Expand Down

0 comments on commit 45df4f1

Please sign in to comment.