Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
hadrienk committed Dec 13, 2024
1 parent 1efe317 commit 9c8ce5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions configloader/configloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ func (l *Loader) keyName(variable Field) (string, error) {
} else {
names = append(names, l.fieldConversion(field.Name))
}

}
key := strings.Join(names, "_")
return key, nil
Expand Down Expand Up @@ -295,7 +294,6 @@ func (l *Loader) getChildren(current Field) []Field {
Path: append(current.Path, ft),
})
}

}
return children
}
Expand Down
6 changes: 3 additions & 3 deletions configloader/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ func (e *ConfigLoadError) Add(err error) {
}

func (e *ConfigLoadError) Error() string {
var msgs []string
for _, err := range e.Errors {
msgs = append(msgs, err.Error())
var msgs = make([]string, len(e.Errors))
for i, err := range e.Errors {
msgs[i] = err.Error()
}
return fmt.Sprintf("failed to load %s:\n%s", e.Value.String(),
strings.Join(msgs, "\n"))
Expand Down

0 comments on commit 9c8ce5e

Please sign in to comment.