Skip to content

Commit

Permalink
Asset errors map: fix lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
joelrebel committed Aug 31, 2023
1 parent b2b010b commit 44fd9f3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions internal/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,9 @@ func (a *Asset) AppendError(key CollectorError, value string) {
}

func (a *Asset) HasError(cErr CollectorError) bool {
for k := range a.Errors {
if k == string(cErr) {
return true
}
}
_, exists := a.Errors[string(cErr)]

return false
return exists
}

// Config holds application configuration read from a YAML or set by env variables.
Expand Down

0 comments on commit 44fd9f3

Please sign in to comment.