You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the first char isn't capitalized, the field isn't exported, and can't be used.
This gets flagged by my Bazel nogo rules as well:
compilepkg: nogo: errors found by nogo during build-time code analysis:
lib/…/client.go:17767:2: struct field _24_Hour_Shift has json tag but is not exported (structtag)
The text was updated successfully, but these errors were encountered:
Just rename the variable in your case to "Hour_Shift_24" but keep the xml and json tag description. Then the struct field will be exported (as is capitalized) as desired but mapped back to "_24_Hour_Shift".
Just rename the variable in your case to "Hour_Shift_24" but keep the xml and json tag description. Then the struct field will be exported (as is capitalized) as desired but mapped back to "_24_Hour_Shift".
Yes, as a purely pragmatic matter, I have already built a thing into our codegen process that automatically edits the file, even though the literal first line says "DO NOT EDIT." Since otherwise, the next time someone ran codegen, the change would be reverted.
The problem isn't "how can I fix the output," it's that gowsdl generates broken output in the first place. This is a bug report, not a StackOverflow question.
I have a WSDL with this element:
gowsdl produces this struct field:
Since the first char isn't capitalized, the field isn't exported, and can't be used.
This gets flagged by my Bazel nogo rules as well:
The text was updated successfully, but these errors were encountered: