Skip to content

Commit

Permalink
Merge pull request #220 from rebuy-de/add-no-content
Browse files Browse the repository at this point in the history
add NoContent view
  • Loading branch information
svenwltr authored Nov 15, 2024
2 parents 60c9250 + 8f4f2da commit 9bb95d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/webutil/viewfuncs.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ func ViewInlineHTML(status int, data string, a ...any) http.HandlerFunc {
fmt.Fprintf(w, data, a...)
}
}

func ViewNoContent(status int) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(status)
}
}

0 comments on commit 9bb95d2

Please sign in to comment.