From ffb456bf898518b5897329ff615485a0e3e54206 Mon Sep 17 00:00:00 2001 From: Vitaly Antonenko Date: Tue, 14 Jun 2022 22:54:56 +0300 Subject: [PATCH] make func newConfig exportable --- config.go | 2 +- config_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.go b/config.go index 2d6e1ae..c0bbccc 100644 --- a/config.go +++ b/config.go @@ -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 diff --git a/config_test.go b/config_test.go index 41376ef..d782617 100644 --- a/config_test.go +++ b/config_test.go @@ -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) })