goroute alternatives and similar packages
Based on the "Routers" category.
Alternatively, view goroute alternatives based on common mentions on social networks and blogs.
-
xujiajun/gorouter
xujiajun/gorouter is a simple and fast HTTP router for Go. It is easy to build RESTful APIs and your web framework.
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of goroute or a related project?
Popular Comparisons
README
Few main features
- Minimal core.
- No external runtime dependencies. Custom middlewares which requires 3th party dependecies are places in separates repositories under goroute org.
- HTTP Routing.
- Middlewares support.
- Global error handling.
Getting Started
Prerequisites
You need to have at least go 1.11 installed on you local machine.
Installing
Install go route package with go get
go get -u github.com/goroute/route
Start your first server. Create main.go file and add:
package main
import (
"net/http"
"log"
"github.com/goroute/route"
)
type helloResponse struct {
Title string `json:"title"`
}
func main() {
mux := route.NewServeMux()
mux.Use(func(c route.Context, next route.HandlerFunc) error {
log.Println("Hello, Middleware!")
return next(c)
})
mux.GET("/", func(c route.Context) error {
return c.JSON(http.StatusOK, &helloResponse{Title:"Hello, JSON!"})
})
log.Fatal(http.ListenAndServe(":9000", mux))
}
Run it
go run main.go
More examples
See examples
Built With
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details
Acknowledgments
- This project is largely inspired by echo. Parts of the code are adopted from echo. See NOTICE.
*Note that all licence references and agreements mentioned in the goroute README section above
are relevant to that project's source code only.