Skip to content

Instantly share code, notes, and snippets.

@LukeWinikates
Created November 30, 2024 17:39
Show Gist options
  • Save LukeWinikates/5fc21725ac3442c37a4b2a224e82c63b to your computer and use it in GitHub Desktop.
Save LukeWinikates/5fc21725ac3442c37a4b2a224e82c63b to your computer and use it in GitHub Desktop.
a typesafe router DSL for golang, inspired by

features I care about:

is the best way to do the DSL like this:

route.StaticSegment("api", function() {})
route.ParameterSegment[int](function(id: int) {
  // but how do we pass this into the handlers defined in here?
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment