summaryrefslogtreecommitdiff
path: root/vendor/github.com/go-chi/chi/v5/pattern.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/go-chi/chi/v5/pattern.go')
-rw-r--r--vendor/github.com/go-chi/chi/v5/pattern.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/go-chi/chi/v5/pattern.go b/vendor/github.com/go-chi/chi/v5/pattern.go
new file mode 100644
index 0000000..890a2c2
--- /dev/null
+++ b/vendor/github.com/go-chi/chi/v5/pattern.go
@@ -0,0 +1,16 @@
+//go:build go1.23 && !tinygo
+// +build go1.23,!tinygo
+
+package chi
+
+import "net/http"
+
+// supportsPattern is true if the Go version is 1.23 and above.
+//
+// If this is true, `net/http.Request` has field `Pattern`.
+const supportsPattern = true
+
+// setPattern sets the mux matched pattern in the http Request.
+func setPattern(rctx *Context, r *http.Request) {
+ r.Pattern = rctx.routePattern
+}