Skip to content

Commit

Permalink
ci(lint): Add linting step
Browse files Browse the repository at this point in the history
  • Loading branch information
ldebruijn committed Sep 25, 2023
1 parent d216d25 commit 5676b74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ jobs:

- name: Test
run: make test

- name: Lint
run: make lint
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ func (b *BlockFieldSuggestionsHandler) ProcessBody(payload map[string]interface{
}

func (b *BlockFieldSuggestionsHandler) processErrors(payload interface{}) interface{} {
switch payload.(type) {
switch payload := payload.(type) {
case []map[string]interface{}:
for _, err := range payload.([]map[string]interface{}) {
err = b.processError(err)
for _, err := range payload {
_ = b.processError(err)
}
case []interface{}:
for _, err := range payload.([]interface{}) {
for _, err := range payload {
e, ok2 := err.(map[string]interface{})
if !ok2 {
continue
}
e = b.processError(e)
_ = b.processError(e)
}
}
return payload
Expand Down

0 comments on commit 5676b74

Please sign in to comment.