Skip to content

Commit

Permalink
add the type signature for default respond function variables
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed May 12, 2024
1 parent 940d211 commit 4e9dfaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions http/reqresp/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,14 @@ func (c *Context) Respond(response result.Response) {

var (
// DefaultRespond is the default result responder.
DefaultRespond = defaultRespond
DefaultRespond func(http.ResponseWriter, *http.Request, result.Response) = defaultRespond

// DefaultContextRespond is the default result responder based on Context.
DefaultContextRespond = defaultContextRespond
DefaultContextRespond func(*Context, result.Response) = defaultContextRespond

// DefaultContextRespondByCode is the default result responder
// based on Context and ResponseCode.
DefaultContextRespondByCode = defaultContextRespondByCode
DefaultContextRespondByCode func(*Context, string, result.Response) = defaultContextRespondByCode
)

func defaultRespond(w http.ResponseWriter, r *http.Request, response result.Response) {
Expand Down

0 comments on commit 4e9dfaf

Please sign in to comment.