Documentation
¶
Overview ¶
Package nethttp is gota's Phase 1 router plugin. It statically recognizes route registrations against net/http's ServeMux:
mux.HandleFunc("GET /users/{id}", GetUser)
mux.Handle("POST /users", http.HandlerFunc(CreateUser))
http.HandleFunc("/health", HealthCheck)
Patterns follow Go 1.22's enhanced ServeMux syntax ("METHOD /path"). Per net/http's own ServeMux docs, "a pattern with no method matches every method" — so a registration like http.HandleFunc("/health", HealthCheck) expands into one Route per HTTP method gota's model supports (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE), all bound to the same handler, rather than being narrowed to GET. Path parameters use the same "{name}" syntax as OpenAPI path templates, so no translation is needed between the two.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.