Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csutorasa/go-tags
This library simplifies the processing of custom struct tags
https://github.com/csutorasa/go-tags
Last synced: about 1 month ago
JSON representation
This library simplifies the processing of custom struct tags
- Host: GitHub
- URL: https://github.com/csutorasa/go-tags
- Owner: csutorasa
- License: mit
- Created: 2024-09-16T15:10:22.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-16T20:39:15.000Z (4 months ago)
- Last Synced: 2024-09-17T18:37:54.078Z (4 months ago)
- Language: Go
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# go-tags
This library simplifies the processing of custom [struct tags](https://go.dev/ref/spec#Tag).
The recommended use case are where framworks are generic, and use-cases could be more specific.
Take inspiration from [Well-known struct tags](https://go.dev/wiki/Well-known-struct-tags),
where most use-cases are structured object data based converters.## Install
Go 1.22 is the minimum supported version.
```sh
go get github.com/csutorasa/go-tags
```## Example
The [gotaghttp](gotaghttp/) shows an example of how the [net/http.Request](https://pkg.go.dev/net/http#Request) variables can be parsed.
Request body format, expected query and path parameters or form values are all gerenic,
but most endpoints expect a few well defined values.