Conversation
|
Thanks @amanenk 👍 Can you share an example struct with this use case? It will make it easier to understand the reasoning behind the PR |
from https://pkg.go.dev/encoding/json
See https://pkg.go.dev/google.golang.org/api@v0.96.0/dns/v1#ManagedZone for example (notice the last fields that are of use only to SDK). |
|
Thanks @candiduslynx that makes sense 🚀 |
|
@amanenk Could we please add a test case for this before merging? |
🤖 I have created a release *beep* *boop* --- ## [0.7.4](v0.7.3...v0.7.4) (2022-09-20) ### Bug Fixes * Skip fields that have "-" json tag ([#137](#137)) ([de4ad3f](de4ad3f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Summary
If field has a
json: "-"tag that means that it is not the data parsed from api. so such a field should be skipped.Use the following steps to ensure your PR is ready to be reviewed
go fmtto format your code 🖊golangci-lint run🚨 (install golangci-lint here)