File: pattern_fallback.go

package info (click to toggle)
golang-github-go-chi-chi 5.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 664 kB
  • sloc: makefile: 19
file content (17 lines) | stat: -rw-r--r-- 473 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//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 = false

// setPattern sets the mux matched pattern in the http Request.
//
// setPattern is only supported in Go 1.23 and above so
// this is just a blank function so that it compiles.
func setPattern(rctx *Context, r *http.Request) {}