diff --git a/cmd/server/main.go b/cmd/server/main.go index ef924acc5..06b1c862d 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -12,8 +12,8 @@ import ( "github.com/BuxOrg/bux-server/config" "github.com/BuxOrg/bux-server/dictionary" _ "github.com/BuxOrg/bux-server/docs" + "github.com/BuxOrg/bux-server/logging" "github.com/BuxOrg/bux-server/server" - "github.com/BuxOrg/bux/logging" ) // main method starts everything for the BUX Server diff --git a/config/config_test.go b/config/config_test.go index 5d4c970bc..a43e41b8d 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/BuxOrg/bux/logging" + "github.com/BuxOrg/bux-server/logging" "github.com/mrz1836/go-cachestore" "github.com/mrz1836/go-datastore" "github.com/newrelic/go-agent/v3/newrelic" diff --git a/config/load.go b/config/load.go index 6d32b907b..30d2a8f54 100644 --- a/config/load.go +++ b/config/load.go @@ -6,10 +6,11 @@ import ( "strings" "sync" - "github.com/BuxOrg/bux-server/dictionary" "github.com/mitchellh/mapstructure" "github.com/rs/zerolog" "github.com/spf13/viper" + + "github.com/BuxOrg/bux-server/dictionary" ) // Added a mutex lock for a race-condition @@ -34,12 +35,11 @@ func Load(logger *zerolog.Logger) (appConfig *AppConfig, err error) { return nil, err } - appConfig = new(AppConfig) - if err = unmarshallToAppConfig(appConfig); err != nil { + if err = unmarshallToAppConfig(DefaultAppConfig); err != nil { return nil, err } - return appConfig, nil + return DefaultAppConfig, nil } func setDefaults() error { diff --git a/config/load_test.go b/config/load_test.go index 56f3c7542..e09fba777 100644 --- a/config/load_test.go +++ b/config/load_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/BuxOrg/bux/logging" + "github.com/BuxOrg/bux-server/logging" "github.com/spf13/viper" "github.com/stretchr/testify/assert" )