A minimal REST framework for Go that uses reflection and dynamic typing to simplify API handlers.
go-rest is a minimal REST framework for Go that simplifies building HTTP APIs by using reflection and dynamic typing to reduce boilerplate code. It automatically handles JSON marshaling of Go structs and provides a concise API with only three main functions. The framework is designed for developers who want to quickly create lightweight REST services without extensive configuration.
Go developers building simple to moderate REST APIs who value minimalism and reduced boilerplate over strict idiomatic Go patterns.
It dramatically reduces code verbosity by automating request/response mapping and JSON serialization, offering an extremely concise API surface compared to more verbose frameworks.
A small and evil REST framework for Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
With only three core functions (HandleGET, HandlePOST, RunServer), the framework is incredibly easy to learn and use, reducing initial setup time and cognitive load, as highlighted in the README's philosophy of prioritizing developer convenience.
Structs returned by handlers are automatically converted to JSON responses, eliminating boilerplate serialization code, as demonstrated in examples where MyStruct is marshaled without explicit calls.
Supports various handler function types, including optional URL parameters and error returns, allowing for adaptable API design without extra configuration, as shown in the GET and POST handler formats.
Heavily relies on reflection and dynamic typing, which the README acknowledges as an anti-pattern in Go, leading to potential runtime errors, reduced type safety, and performance overhead compared to static approaches.
Only handles GET and POST methods with no built-in support for middleware, authentication, or advanced routing, making it inadequate for complex or scalable APIs that require more comprehensive tooling.
The brief README and reliance on external documentation may hinder developers seeking detailed guidance, troubleshooting, or examples beyond the basic usage covered.