Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
strict config parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
svenwltr committed Jun 20, 2018
1 parent 4167917 commit 16d58ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func NewRootCommand() *cobra.Command {

n.Config, err = config.Load(n.Parameters.ConfigPath)
if err != nil {
log.Error("Failed to parse config file.")
return err
}

Expand Down
9 changes: 5 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ import:
- package: golang.org/x/sync
subpackages:
- semaphore
- package: gopkg.in/yaml.v2
version: ^2.2.1
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func Load(path string) (*Nuke, error) {
}

config := new(Nuke)
err = yaml.Unmarshal(raw, config)
err = yaml.UnmarshalStrict(raw, config)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 16d58ff

Please sign in to comment.