Skip to content

Commit

Permalink
set default for all schemes
Browse files Browse the repository at this point in the history
  • Loading branch information
LandonTClipp committed Nov 19, 2024
1 parent 50099dd commit 778d555
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,12 @@ func NewConfigFromViper(v *viper.Viper) (*Config, error) {
}

// Set defaults
v.SetDefault("resolve-type-alias", true)
if len(packageList) == 0 {
v.SetDefault("case", "camel")
v.SetDefault("dir", ".")
v.SetDefault("output", "./mocks")
v.SetDefault("resolve-type-alias", true)

} else {
v.SetDefault("dir", "mocks/{{.PackagePath}}")
v.SetDefault("filename", "mock_{{.InterfaceName}}.go")
Expand All @@ -110,7 +111,6 @@ func NewConfigFromViper(v *viper.Viper) (*Config, error) {
v.SetDefault("with-expecter", true)
v.SetDefault("dry-run", false)
v.SetDefault("log-level", "info")
v.SetDefault("resolve-type-alias", false)
}

if err := v.UnmarshalExact(c); err != nil {
Expand Down

0 comments on commit 778d555

Please sign in to comment.