Skip to content

Commit

Permalink
Use 'mapstructure' instead of 'yaml' in pkg/config
Browse files Browse the repository at this point in the history
This is related of how Viper processes the Config File.

Read more at: spf13/viper#338
  • Loading branch information
l0nax committed Aug 2, 2019
1 parent d017735 commit 60a246b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package config
import ()

type Configuration struct {
Regitry RegistryConf `yaml:"registry"`
Regitry RegistryConf `mapstructure:"registry"`
}
8 changes: 4 additions & 4 deletions pkg/config/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package config
import ()

type RegistryConf struct {
RegistryURI string `yaml:"uri"`
RequireAuth bool `yaml:"require_auth"`
Username string `yaml:"username"`
Password string `yaml:"password"`
RegistryURI string `mapstructure:"uri"`
RequireAuth bool `mapstructure:"require_auth"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
}

0 comments on commit 60a246b

Please sign in to comment.