https://github.com/acim/gap
Library for easy implementation of REST API's in Go
https://github.com/acim/gap
Last synced: 3 months ago
JSON representation
Library for easy implementation of REST API's in Go
- Host: GitHub
- URL: https://github.com/acim/gap
- Owner: acim
- License: apache-2.0
- Created: 2023-03-11T17:51:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-17T11:38:08.000Z (over 1 year ago)
- Last Synced: 2025-02-07T15:44:52.405Z (5 months ago)
- Language: Go
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# gap
[](https://github.com/acim/gap/actions/workflows/pipeline.yaml)
[](https://pkg.go.dev/go.acim.net/gap)
[](https://goreportcard.com/report/go.acim.net/gap)
Library for easy implementation of REST API's in Go. Besides helpers to decode and encode JSON payloads using standard library _http.HandlerFunc_ type of handler, this library supports handler functions returning errors, e.g. _func(w http.ResponseWriter, req \*http.Request) error_ and makes errors handling much easier. Finally, it also contains idiomatic Go middlewares for HTTP request logging using [slog](https://pkg.go.dev/golang.org/x/exp/slog) and [zap](https://github.com/uber-go/zap) loggers. Please look at the tests for example usages.
## Warning :construction:
This project is in an early stage so you can expect API breaking changes until the first major release.
## License
Licensed under either of
- Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)at your option.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.