diff options
Diffstat (limited to 'cmd/cashier/client/config.go')
-rw-r--r-- | cmd/cashier/client/config.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/cashier/client/config.go b/cmd/cashier/client/config.go index d4defef..1cc9401 100644 --- a/cmd/cashier/client/config.go +++ b/cmd/cashier/client/config.go @@ -5,6 +5,7 @@ import ( "github.com/spf13/viper" ) +// Config holds the client configuration. type Config struct { CA string `mapstructure:"ca"` Keytype string `mapstructure:"key_type"` @@ -21,6 +22,7 @@ func setDefaults() { viper.SetDefault("validateTLSCertificate", true) } +// ReadConfig reads the client configuration from a file into a Config struct. func ReadConfig(path string) (*Config, error) { setDefaults() viper.SetConfigFile(path) |