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
Javascript really does not like to get a null when it expects an empty array,
but that's what Go will send if your struct contains e.g. a []string and
you don't explicitly initialize the slice. These custom marshallers make sure
we send an empty array, making the frontend's life easier.
Go desperately needs some way to tell the JSON encoder that we want this
behavior, see:
golang/go#37711golang/go#27589golang/go#27813
0 commit comments