Skip to content

Commit

Permalink
fixup! replace MVP with ViewWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
svenwltr committed Apr 13, 2022
1 parent 6370a40 commit 3982699
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/webutil/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func (v *View) Error(status int, err error) http.HandlerFunc {
}
}

func (v *View) Errorf(status int, text string, a ...interface{}) http.HandlerFunc {
return v.Error(status, fmt.Errorf(text, a...))
}

func (v *View) Redirect(status int, location string, args ...interface{}) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
url := fmt.Sprintf(location, args...)
Expand Down

0 comments on commit 3982699

Please sign in to comment.