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. -
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: -
Gorilla WebSocket
DISCONTINUED. A fast, well-tested and widely used WebSocket implementation for Go. -
GoFrame
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang. -
goa
🌟 Goa: Elevate Go API development! 🚀 Streamlined design, automatic code generation, and seamless HTTP/gRPC support. ✨ -
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. -
Huma
A modern, simple, fast & flexible micro framework for building HTTP REST/RPC APIs in Go backed by OpenAPI 3 and JSON Schema. -
GoFr
An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability. -
go-server-timing
DISCONTINUED. Go (golang) library for creating and consuming HTTP Server-Timing headers
InfluxDB - Purpose built for real-time analytics at any scale.
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.