internal/encoding/gotypes: generate valid json tags for quoted fields
This change updates the behavior of the generator to unquote field names
when they are strings, as they may be quoted, resulting in the json tag
being double quoted:
type Example struct {
FooBar string `json:""foo-bar""`
}
Fixes #3882.
Closes #3883 as merged as of commit ad5e0b0d.
Signed-off-by: Travis Truman <trumant@gmail.com>
Change-Id: I74f3cc0a2d70944b6d50e5ad60cfa4cf67f4cf54
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1213127
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
authored by