Skip to content

Commit

Permalink
renaming var
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hoffman committed Nov 3, 2017
1 parent 061792b commit e1e5d48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions logical/framework/field_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,13 @@ func (d *FieldData) getPrimitive(
}

// If map parse fails, parse as a string list of = delimited pairs
var csvResult []string
if err := mapstructure.WeakDecode(raw, &csvResult); err != nil {
var listResult []string
if err := mapstructure.WeakDecode(raw, &listResult); err != nil {
return nil, true, err
}

result := make(map[string]string, len(csvResult))
for _, keyPair := range csvResult {
result := make(map[string]string, len(listResult))
for _, keyPair := range listResult {
keyPairSlice := strings.SplitN(keyPair, "=", 2)
if len(keyPairSlice) != 2 || keyPairSlice[0] == "" {
return nil, false, fmt.Errorf("invalid key pair %q", keyPair)
Expand Down

0 comments on commit e1e5d48

Please sign in to comment.