Popularity
7.7
Declining
Activity
0.0
Stable
1,293
38
88
Programming language: Go
License: MIT License
Tags:
Web Frameworks
Latest version: v1.3.0
Bone alternatives and similar packages
Based on the "Web Frameworks" category.
Alternatively, view Bone alternatives based on common mentions on social networks and blogs.
-
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin. -
Gorilla WebSocket
A fast, well-tested and widely used WebSocket implementation for Go. -
Iris
The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio :rocket: -
go-kratos
Your ultimate Go microservices framework for the cloud-native era. -
GoFrame
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang. -
go-socket.io
socket.io library for golang, a realtime application framework. -
Hertz
Go HTTP framework with high-performance and strong-extensibility for building micro-services. -
Macaron
Package macaron is a high productive and modular web framework in Go. -
Faygo
Faygo is a fast and concise Go Web framework that can be used to develop high-performance web app(especially API) with fewer codes. Just define a struct handler, faygo will automatically bind/verify the request parameters and generate the online API doc. -
render
Go package for easily rendering JSON, XML, binary data, and HTML templates responses. -
pat
Sinatra style pattern muxer for Go’s net/http library, by the author of Sinatra. -
tigertonic
A Go framework for building JSON web services inspired by Dropwizard -
Atreugo
High performance and extensible micro web framework. Zero memory allocations in hot paths. -
fasthttprouter
A high performance fasthttp request router that scales well -
Goji
Goji is a minimalistic and flexible HTTP request multiplexer for Go (golang) -
Beego
beego is an open-source, high-performance web framework for the Go programming language. -
go-server-timing
Go (golang) library for creating and consuming HTTP Server-Timing headers -
Gearbox
Gearbox :gear: is a web framework written in Go with a focus on high performance -
golongpoll
golang long polling library. Makes web pub-sub easy via HTTP long-poll servers and clients :smiley: :coffee: :computer:
ONLYOFFICE Docs — document collaboration in your environment
Powerful document editing and collaboration in your app or environment. Ultimate security, API and 30+ ready connectors, SaaS or on-premises
Promo
www.onlyoffice.com
Do you think we are missing an alternative of Bone or a related project?
Popular Comparisons
README
bone

What is bone ?
Bone is a lightweight and lightning fast HTTP Multiplexer for Golang. It support :
- URL Parameters
- REGEX Parameters
- Wildcard routes
- Router Prefix
- Route params validators
- Sub Router,
mux.SubRoute()
, support most standard router (bone, gorilla/mux, httpRouter etc...) - Http method declaration
- Support for
http.Handler
andhttp.HandlerFunc
- Custom NotFound handler
- Respect the Go standard
http.Handler
interface
Speed
- BenchmarkBoneMux 10000000 118 ns/op
- BenchmarkZeusMux 100000 144 ns/op
- BenchmarkHttpRouterMux 10000000 134 ns/op
- BenchmarkNetHttpMux 3000000 580 ns/op
- BenchmarkGorillaMux 300000 3333 ns/op
- BenchmarkGorillaPatMux 1000000 1889 ns/op
These tests are just for fun, all these routers are great and efficient. Bone isn't the fastest router for every job.
Example
package main
import(
"net/http"
"github.com/go-zoo/bone"
)
func main () {
mux := bone.New()
mux.RegisterValidatorFunc("isNum", func(s string) bool {
if _, err := strconv.Atoi(s); err == nil {
return true
}
return false
})
// mux.Get, Post, etc ... takes http.Handler
// validator for route parameter
mux.Get("/home/:id|isNum", http.HandlerFunc(HomeHandler))
// multiple parameter
mux.Get("/profil/:id/:var", http.HandlerFunc(ProfilHandler))
mux.Post("/data", http.HandlerFunc(DataHandler))
// Support REGEX Route params
mux.Get("/index/#id^[0-9]$", http.HandlerFunc(IndexHandler))
// Handle take http.Handler
mux.Handle("/", http.HandlerFunc(RootHandler))
// GetFunc, PostFunc etc ... takes http.HandlerFunc
mux.GetFunc("/test", Handler)
http.ListenAndServe(":8080", mux)
}
func Handler(rw http.ResponseWriter, req *http.Request) {
// Get the value of the "id" parameters.
val := bone.GetValue(req, "id")
rw.Write([]byte(val))
}
Blog Posts
- http://www.peterbe.com/plog/my-favorite-go-multiplexer
- https://harshladha.xyz/my-first-library-in-go-language-hasty-791b8e2b9e69