Skip to content

Commit

Permalink
remove config init function
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonTheLeg committed Jul 2, 2024
1 parent 2187ca9 commit 363e751
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@ import (
"os"
)

var curConf *Config
var curConf *Config = &Config{}

// Config describes all values that can currently be configured for konf
type Config struct {
KonfDir string
Silent bool
}

// ensure that a default config exists so we don't run into nil pointer exceptions
// TODO remove this as soon as we got rid of id.StorePath and id.ActivePath
func init() {
curConf = &Config{}
}

// ConfFromHomeDir returns an initialized config based on the users HomeDir
func ConfFromHomeDir() (*Config, error) {
c := &Config{}
Expand Down

0 comments on commit 363e751

Please sign in to comment.