restruct
flamego
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
restruct
-
what's your recommended router? chi, mux, something else?
For me it's mux and my personal router restruct but since mux is not maintained anymore, maybe chi will be my goto for new projects that needs more stability in the api. Since restruct is a router based on structs, which I use for fast prototyping.
- Created a minimal JSON API 'framework'
-
Best golang framework for microservice
Not the best, but after using gorilla mux for routing for a while, I've decided to build my own https://github.com/altlimit/restruct
-
Looking for advice for Go Backend REST API for a Front End React/NodeJS
I've always just use gorilla mux and try to stay close to standard handlers as much as possible and code my request response process. As I've done this multiple times and actually been doing things over and over again I've developed my own router based on structs. Most of the time I develop something that's not going to be public api so I just want to easily build endpoints from struct method without defining new routes. I made https://github.com/altlimit/restruct for it. I also made it flexible so it can do a good amount of routing config. Then with same idea on authentication I made gauth. It's under the same org of that repository. Just to make my development for clients faster while sticking close to standards. I can't find myself using those frameworks that keeps introducing their own context somehow. I did use them before but somehow just doesn't feel right.
- Added strongly typed handlers in RESTruct
- Is it possible to write a well-typed controller/handler in Go?
-
RESTruct a rest/route framework based on struct methods.
github.com/altlimit/restruct
flamego
-
Is it possible to write a well-typed controller/handler in Go?
Flamego and it's predecessor Macaron also allow a lot of flexibility in the handler definition.
What are some alternatives?
httprouter - A high performance HTTP request router that scales well
Macaron - Package macaron is a high productive and modular web framework in Go.
waggy - The dead simple, easy-to-use library for writing HTTP handlers and routers in Go that can be used in standard HTTP server environments or in WAGI (Web Assembly Gateway Interface) environments
go-japi - Japi is a fast & simple HTTP API library that automatically marshals JSON payloads and uses RFC7807 for problem details
snug - Simple stdlib compatible router with shortcuts to dump json api things
grpc-gateway - gRPC to JSON proxy generator following the gRPC HTTP spec
goa - 🌟 Goa: Elevate Go API development! 🚀 Streamlined design, automatic code generation, and seamless HTTP/gRPC support. ✨
oapi-codegen - Generate Go client and server boilerplate from OpenAPI 3 specifications
gRPC - The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
Fiber - ⚡️ Express inspired web framework written in Go
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.