Skip to content

How to NOT marshal a field ? #675

Answered by moorereason
aj3423 asked this question in Questions
Discussion options

You must be logged in to vote

With go-toml/v2 use this:

// Field is ignored
Name string `toml:"-"`

This use case is missing from the v2 godocs.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pelletier
Comment options

Answer selected by aj3423
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants