google / go-querystring

go-querystring is Go library for encoding structs into URL query strings.
https://pkg.go.dev/github.com/google/go-querystring/query
BSD 3-Clause "New" or "Revised" License
1.99k stars 173 forks source link

feat: add tag option string for struct type filed #123

Open LYY opened 2 months ago

LYY commented 2 months ago

Some third-part libraries like https://github.com/shopspring/decimal is wildly used in many projects.

It's not easily to add encoder method directly, but can use func String() string method for encoded value.

For that purpose, add tag option string to force struct value use valueString method.

google-cla[bot] commented 2 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.