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
Instead, I believe you intended to use ",omitempty" to keep the default name and add the omitempty option.
You can test this behavior with this simple Go program. As you can see by the result, the omitempty key in the JSON string gets unmarshaled to the field with the json:"omitempty" tag.
Description
Hi! While doing a broad search for this pattern, I noticed that you use
"omitempty"
as the name of a structure field.gitea/models/admin/task.go
Line 47 in cd225d7
Instead, I believe you intended to use
",omitempty"
to keep the default name and add theomitempty
option.You can test this behavior with this simple Go program. As you can see by the result, the
omitempty
key in the JSON string gets unmarshaled to the field with thejson:"omitempty"
tag.Gitea Version
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Database
None
The text was updated successfully, but these errors were encountered: