Documentation
¶
Overview ¶
Package stdhttp is the router for http.ServeMux of the standard library, with its method and wildcard patterns.
Index ¶
- type Framework
- func (Framework) Conflicts(routes []framework.Route) ([]framework.Route, []framework.Conflict)
- func (Framework) Handler(s *gocode.Scope) framework.Handler
- func (Framework) Imports() []gomodel.Import
- func (Framework) Name() string
- func (Framework) PathParam(_ *gocode.Scope, name string) string
- func (Framework) RoutePattern(method, oasPath string) (string, error)
- func (Framework) Templates() fs.FS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Framework ¶
type Framework struct{}
Framework is the http.ServeMux router.
func (Framework) Conflicts ¶
Conflicts drops every route a ServeMux panics on, next to the earlier ones or alone. It asks a ServeMux of the generator's own Go release, so GODEBUG=httpmuxgo121=1, which switches method and wildcard patterns off, leaves every route in.
func (Framework) RoutePattern ¶
RoutePattern writes METHOD /path so the route matches the path and nothing else: a parameter as a wildcard named as an identifier, a trailing * as {rest...}, a trailing slash as {$}. It fails on what ServeMux panics on.
Click to show internal directories.
Click to hide internal directories.