Golf alternatives and similar packages
Based on the "Web Frameworks" category.
Alternatively, view Golf 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. -
go-kratos
Your ultimate Go microservices framework for the cloud-native era. -
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: -
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. -
Atreugo
High performance and extensible micro web framework. Zero memory allocations in hot paths. -
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 -
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:
Collect and Analyze Billions of Data Points in Real Time
Do you think we are missing an alternative of Golf or a related project?
Popular Comparisons
README
A fast, simple and lightweight micro-web framework for Go, comes with powerful features and has no dependencies other than the Go Standard Library.
Homepage: golf.readme.io
Installation
go get github.com/dinever/golf
Features
- No allocation during routing and parameter retrieve.
Dead simple template inheritance with
extends
andinclude
helper comes out of box.layout.html
<h1>Hello World</h1> {{ template "body" }} {{ include "sidebar.html" }}
index.html
{{ extends "layout.html" }} {{ define "body"}} <p>Main content</p> {{ end }}
sidebar.html
<p>Sidebar content</p>
Built-in XSRF and Session support.
Powerful middleware chain.
Configuration from JSON file.
Hello World
package main
import "github.com/dinever/golf"
func mainHandler(ctx *golf.Context) {
ctx.Send("Hello World!")
}
func pageHandler(ctx *golf.Context) {
ctx.Send("Page: " + ctx.Param("page"))
}
func main() {
app := golf.New()
app.Get("/", mainHandler)
app.Get("/p/:page/", pageHandler)
app.Run(":9000")
}
The website will be available at http://localhost:9000.
Benchmark
The following chart shows the benchmark performance of Golf compared with others.
For more information, please see [BENCHMARKING.md](BENCHMARKING.md)
Docs
License
*Note that all licence references and agreements mentioned in the Golf README section above
are relevant to that project's source code only.