alien alternatives and similar packages
Based on the "Web Frameworks" category.
Alternatively, view alien 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. A true successor of expressjs and laravel. Supports AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. Thank you / 谢谢 https://github.com/kataras/iris/issues/1329 -
go-kratos
Your ultimate Go microservices framework for the cloud-native era. -
go-socket.io
socket.io library for golang, a realtime application framework. -
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 -
Goji
Goji is a minimalistic and flexible HTTP request multiplexer for Go (golang) -
fasthttprouter
A high performance fasthttp request router that scales well -
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 -
Beego
beego is an open-source, high-performance web framework for the Go programming language. -
xujiajun/gorouter
xujiajun/gorouter is a simple and fast HTTP router for Go. It is easy to build RESTful APIs and your web framework. -
golongpoll
golang long polling library. Makes web pub-sub easy via HTTP long-poll servers and clients :smiley: :coffee: :computer: -
traffic
Sinatra inspired regexp/pattern mux and web framework for Go [NOT MAINTAINED] -
ozzo-routing
An extremely fast Go (golang) HTTP router that supports regular expression route matching. Comes with full support for building RESTful APIs.
Static code analysis for 29 languages.
Do you think we are missing an alternative of alien or a related project?
Popular Comparisons
README
Alien

Alien is a lightweight http router( multiplexer) for Go( Golang ), made for humans who don't like magic.
Documentation docs
Features
- fast ( see the benchmarks, or run them yourself)
- lightweight ( just [a single file](alien.go) read all of it in less than a minute)
- safe( designed with concurrency in mind)
- middleware support.
- routes groups
- no external dependency( only the standard library )
Motivation
I wanted a simple, fast, and lightweight router that has no unnecessary overhead using the standard library only, following good practices and well tested code( Over 90% coverage)
Installation
go get github.com/gernest/alien
Usage
normal static routes
package main
import (
"log"
"net/http"
"github.com/gernest/alien"
)
func main() {
m := alien.New()
m.Get("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("hello world"))
})
log.Fatal(http.ListenAndServe(":8090", m))
}
visiting your localhost at path /
will print hello world
named params
package main
import (
"log"
"net/http"
"github.com/gernest/alien"
)
func main() {
m := alien.New()
m.Get("/hello/:name", func(w http.ResponseWriter, r *http.Request) {
p := alien.GetParams(r)
w.Write([]byte(p.Get("name")))
})
log.Fatal(http.ListenAndServe(":8090", m))
}
visiting your localhost at path /hello/tanzania
will print tanzania
catch all params
package main
import (
"log"
"net/http"
"github.com/gernest/alien"
)
func main() {
m := alien.New()
m.Get("/hello/*name", func(w http.ResponseWriter, r *http.Request) {
p := alien.GetParams(r)
w.Write([]byte(p.Get("name")))
})
log.Fatal(http.ListenAndServe(":8090", m))
}
visiting your localhost at path /hello/my/margicl/sheeplike/ship
will print
my/margical/sheeplike/ship
middlewares
Middlewares are anything that satisfy the interface
func(http.Handler)http.Handler
. Meaning you have thousands of middlewares at
your disposal, you can use middlewares from many golang http frameworks on
alien(most support the interface).
package main
import (
"log"
"net/http"
"github.com/gernest/alien"
)
func middleware(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("hello middlware"))
})
}
func main() {
m := alien.New()
m.Use(middleware)
m.Get("/", func(_ http.ResponseWriter, _ *http.Request) {
})
log.Fatal(http.ListenAndServe(":8090", m))
}
visiting your localhost at path /
will print hello middleware
groups
You can group routes
package main
import (
"log"
"net/http"
"github.com/gernest/alien"
)
func main() {
m := alien.New()
g := m.Group("/home")
m.Use(middleware)
g.Get("/alone", func(w http.ResponseWriter, _ *http.Request) {
w.Write([]byte("home alone"))
})
log.Fatal(http.ListenAndServe(":8090", m))
}
visiting your localhost at path /home/alone
will print home alone
Contributing
Start with clicking the star button to make the author and his neighbors happy. Then fork the repository and submit a pull request for whatever change you want to be added to this project.
If you have any questions, just open an issue.
Author
Geofrey Ernest @gernesti on twitter
Licence
MIT see [LICENSE](LICENSE)
*Note that all licence references and agreements mentioned in the alien README section above
are relevant to that project's source code only.