diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index abc8d36..3b90160 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,3 +26,6 @@ jobs: - name: Test run: make test + + - name: Lint + run: make lint diff --git a/internal/business/block_field_suggestions/block_field_suggestions.go b/internal/business/block_field_suggestions/block_field_suggestions.go index db38aac..4f8371a 100644 --- a/internal/business/block_field_suggestions/block_field_suggestions.go +++ b/internal/business/block_field_suggestions/block_field_suggestions.go @@ -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