Skip to content

Commit

Permalink
Merge pull request #34 from oholiab/fix_mount_config_key_missing_panic
Browse files Browse the repository at this point in the history
Fix missing config key panic
  • Loading branch information
jippi authored Aug 12, 2019
2 parents 6293434 + ea6de15 commit 90c1d31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/vault_mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func (c *Config) parseMountConfig(list *ast.ObjectList) ([]*MountConfig, error)

for _, mountConfigAST := range list.Items {
if len(mountConfigAST.Keys) < 1 {
return nil, fmt.Errorf("Missing mount role name in line %+v", mountConfigAST.Keys[0].Pos())
return nil, fmt.Errorf("Missing mount role name in mount config stanza")
}

var m map[string]interface{}
Expand All @@ -218,7 +218,7 @@ func (c *Config) parseMountConfig(list *ast.ObjectList) ([]*MountConfig, error)
func (c *Config) parseMountRole(list *ast.ObjectList, mount *Mount) error {
for _, config := range list.Items {
if len(config.Keys) < 1 {
return fmt.Errorf("Missing mount role name in line %+v", config.Keys[0].Pos())
return fmt.Errorf("Missing mount role name in mount config stanza")
}

var m map[string]interface{}
Expand Down

0 comments on commit 90c1d31

Please sign in to comment.