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
With #81, toml supports the omitempty tag while encoding a struct. For example:
typeSstruct {
Vstring`toml:"value,omitempty"`
}
will skip writing "V" during toml.Encode().
Unfortunately the reverse is not true. omitempty has no meaning for toml.Decode() and is treated as part of the field name. In the example above, toml.Decode() will attempt to decode the field named value,omitempty into "V" and will ignore the field named value.
The text was updated successfully, but these errors were encountered:
With #81, toml supports the
omitempty
tag while encoding a struct. For example:will skip writing "V" during
toml.Encode()
.Unfortunately the reverse is not true.
omitempty
has no meaning fortoml.Decode()
and is treated as part of the field name. In the example above,toml.Decode()
will attempt to decode the field namedvalue,omitempty
into "V" and will ignore the field namedvalue
.The text was updated successfully, but these errors were encountered: