Skip to content

Commit

Permalink
make func newConfig exportable
Browse files Browse the repository at this point in the history
  • Loading branch information
anvial committed Jun 14, 2022
1 parent 67f76bb commit ffb456b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type keymapping struct {
}

//nolint:funlen,cyclop
func newConfig(v *viper.Viper, args []string) (*config, error) {
func NewConfig(v *viper.Viper, args []string) (*config, error) {
flagSet := pflag.NewFlagSet("", pflag.ExitOnError)

// runtimeConfig
Expand Down
2 changes: 1 addition & 1 deletion config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ text = "white"
v.SetConfigType("toml")
assert.NoError(t, v.ReadConfig(bytes.NewBufferString(tt.configFile)))

got, err := newConfig(v, tt.args)
got, err := NewConfig(v, tt.args)
assert.Equal(t, tt.expErr, err)
assert.Equal(t, &tt.want, got)
})
Expand Down

0 comments on commit ffb456b

Please sign in to comment.