Skip to content

Commit

Permalink
Make NoContent fix backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Jille committed Sep 6, 2022
1 parent 1b09f13 commit e432ef6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion respond/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ func Accepted(msg string) internal.HttpResponse {
}

// NoContent creates a HTTP 204 No Content response.
func NoContent() internal.HttpResponse {
// The param ignored exists to provide backwards compatibility with an old bug that accepted a message.
func NoContent(ignored ...string) internal.HttpResponse {
return httpError{204, ""}
}

Expand Down

0 comments on commit e432ef6

Please sign in to comment.