pattern_fallback.go 473 B

1234567891011121314151617
  1. //go:build !go1.23 || tinygo
  2. // +build !go1.23 tinygo
  3. package chi
  4. import "net/http"
  5. // supportsPattern is true if the Go version is 1.23 and above.
  6. //
  7. // If this is true, `net/http.Request` has field `Pattern`.
  8. const supportsPattern = false
  9. // setPattern sets the mux matched pattern in the http Request.
  10. //
  11. // setPattern is only supported in Go 1.23 and above so
  12. // this is just a blank function so that it compiles.
  13. func setPattern(rctx *Context, r *http.Request) {}