MCPcopy
hub / github.com/gofiber/fiber / To

Method To

redirect.go:331–338  ·  view source on GitHub ↗

To redirect to the URL derived from the specified path, with specified status.

(location string)

Source from the content-addressed store, hash-verified

329
330// To redirect to the URL derived from the specified path, with specified status.
331func (r *Redirect) To(location string) error {
332 r.c.setCanonical(HeaderLocation, location)
333 r.c.Status(r.status)
334
335 r.processFlashMessages()
336
337 return nil
338}
339
340// Route redirects to the Route registered in the app with appropriate parameters.
341// If you want to send queries or params to route, you should use config parameter.

Callers 14

RouteMethod · 0.95
BackMethod · 0.95
Test_Redirect_ToFunction · 0.80
Test_Exec_FuncFunction · 0.80
NewFunction · 0.80

Calls 3

processFlashMessagesMethod · 0.95
setCanonicalMethod · 0.65
StatusMethod · 0.65