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 web framework written in Go! It features a martini-like API with much better performance, up to 40 times faster. If you need performance and good productivity. -
Iris
High-performance golang web application framework, providing a robust set of features for building modern web applications. -
go-kit
A Microservice toolkit with support for service discovery, load balancing, pluggable transports, request tracking, etc. -
httprouter
A high performance router. Use this and the standard http handlers to form a very high performance web framework. -
Faygo
Faygo uses the new architecture to make itself the most suitable Go Web framework for developping API. Just define a struct Handler, Faygo will automatically bind, verify the request parameters and generate the online API documentation. -
REST Layer
A framework to build REST/GraphQL API on top of databases with mostly configuration over code. -
Goyave
Feature-complete web framework aimed at clean code and fast development, with powerful built-in functionalities. -
rye
Tiny Go middleware library (with canned Middlewares) that supports JWT, CORS, Statsd, and Go 1.7 context -
ozzo-routing
A high-performance HTTP router and Web framework supporting routes with regular expressions. Comes with full support for quickly building a RESTful API application.
Get performance insights in less than 4 minutes
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.