top

Package r2router provide a simple router. Suitable for API where you could map parameter from the url.

package main

import (
	"github.com/vanng822/r2router"
	"net/http"
)

func main() {
	router := r2router.NewRouter()
	router.Get("/users/:user", func(w http.ResponseWriter, r *http.Request, p r2router.Params) {
		w.Write([]byte(p.Get("user")))
	})
	http.ListenAndServe(":8080", router)
}

Imported by 41 package(s)

  1. github.com/1851616111/go-http-routing-benchmark
  2. github.com/CloudyKit/go-http-routing-benchmark
  3. github.com/JessonChan/go-http-routing-benchmark
  4. github.com/JulienSchmidt/go-http-routing-benchmark
  5. github.com/TheHippo/go-http-routing-benchmark
  6. github.com/Xuyuanp/go-http-routing-benchmark
  7. github.com/beauhoyt/go-http-routing-benchmark
  8. github.com/besser/go-http-routing-benchmark
  9. github.com/bfitzsimmons/go-http-routing-benchmark
  10. github.com/citysir/go-http-routing-benchmark
  11. github.com/dinever/go-http-routing-benchmark
  12. github.com/djinn/go-http-routing-benchmark
  13. github.com/gin-gonic/go-http-routing-benchmark
  14. github.com/go-gas/go-web-framework-benchmark
  15. github.com/gofury/go-web-framework-benchmark
  16. github.com/gotokatsuya/go-http-routing-benchmark
  17. github.com/jbuberel/go-http-routing-benchmark
  18. github.com/joeybloggs/go-http-routing-benchmark
  19. github.com/julienschmidt/go-http-routing-benchmark
  20. github.com/l3pp4rd/go-http-routing-benchmark
  21. github.com/liu-rui/go-http-routing-benchmark
  22. github.com/liu-rui/go-web-framework-benchmark
  23. github.com/lunny/go-http-routing-benchmark
  24. github.com/mikespook/go-http-routing-benchmark
  25. github.com/pegasuskim/go-http-routing-benchmark
  26. github.com/pkieltyka/go-http-routing-benchmark
  27. github.com/qiangxue/go-http-routing-benchmark
  28. github.com/safeie/go-http-routing-benchmark
  29. github.com/shivakar/go-http-routing-benchmark
  30. github.com/smallnest/go-web-framework-benchmark
  31. github.com/sunisdown/go-http-routing-benchmark
  32. github.com/theckman/go-http-routing-benchmark
  33. github.com/twanies/go-http-routing-benchmark
  34. github.com/vanng822/accesslog/example
  35. github.com/vanng822/go-http-routing-benchmark
  36. github.com/vanng822/go-premailer/cmd
  37. github.com/vanng822/imgscale/example
  38. github.com/vanng822/r2router/example
  39. github.com/vanng822/recovery/example
  40. github.com/vanng822/rproxy
  41. github.com/vanng822/uploader/app

Imported only in test by 2 package(s)

  1. github.com/vanng822/accesslog
  2. github.com/vanng822/recovery

Test imports 1 package(s)

  1. github.com/stretchr/testify/assert