diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-09-03 19:22:25 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-09-03 19:22:25 +0100 |
commit | 223b08a898d7fc2b6709f4507ed0831b1f74ee38 (patch) | |
tree | 763ef0d52ce936a5f352d879762507ce0119f318 /cmd/cashier/client/config.go | |
parent | 0af43a29b7cabb6710cd1cb335785ff60dbf758f (diff) |
Add comments for exported types and functions
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) |