go-mux/README.md

18 lines
579 B
Markdown
Raw Permalink Normal View History

2025-03-10 14:46:06 +10:30
## path values
The three examples to go with the blog post at https://hawkins.id.au/posts/go-mux/path-values
These should all work identically, each just shows a different way of achieving
the same thing - extracing a user id from the path and making the user struct
(instantiated from some sort of database, faked in common/db/db.go for this
example) available to the route handler.
2025-03-10 14:48:24 +10:30
If you clone this repo, you can try each variant out:
2025-03-10 14:46:06 +10:30
go run go-mux/pathvalues/1-basic
go run go-mux/pathvalues/2-slightly-less-basic
2025-03-10 14:48:24 +10:30
go run go-mux/pathvalues/3-middleware