Skip to content

Commit

Permalink
fix lint issue - just a simple string
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Jan 18, 2024
1 parent 00d774b commit 822b0c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/server/dto.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func decodeJSONBody(r *http.Request, dst interface{}) error {
msg := fmt.Sprintf("Request body contains badly-formed JSON (at position %d)", syntaxError.Offset)
return &malformedRequest{status: http.StatusBadRequest, message: msg}
case errors.Is(err, io.ErrUnexpectedEOF):
msg := fmt.Sprintf("Request body contains badly-formed JSON")
msg := "Request body contains badly-formed JSON"
return &malformedRequest{status: http.StatusBadRequest, message: msg}
case errors.As(err, &unmarshalTypeError):
msg := fmt.Sprintf("Request body contains an invalid value for the %q field (at position %d)", unmarshalTypeError.Field, unmarshalTypeError.Offset)
Expand Down

0 comments on commit 822b0c4

Please sign in to comment.