MCPcopy
hub / github.com/labstack/echo / Rewrite

Function Rewrite

middleware/rewrite.go:40–44  ·  view source on GitHub ↗

Rewrite returns a Rewrite middleware. Rewrite middleware rewrites the URL path based on the provided rules.

(rules map[string]string)

Source from the content-addressed store, hash-verified

38//
39// Rewrite middleware rewrites the URL path based on the provided rules.
40func Rewrite(rules map[string]string) echo.MiddlewareFunc {
41 c := RewriteConfig{}
42 c.Rules = rules
43 return RewriteWithConfig(c)
44}
45
46// RewriteWithConfig returns a Rewrite middleware or panics on invalid configuration.
47//

Callers

nothing calls this directly

Calls 1

RewriteWithConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…