From d8997efb5a7b09fe391a1535ad136e8048a02af9 Mon Sep 17 00:00:00 2001 From: Thomas Pelletier Date: Wed, 24 Nov 2021 19:52:23 -0500 Subject: [PATCH] Mention "-" to prevent encoding field in doc (#683) --- marshaler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/marshaler.go b/marshaler.go index 9425ebe..9257fd3 100644 --- a/marshaler.go +++ b/marshaler.go @@ -115,7 +115,9 @@ func (enc *Encoder) SetIndentTables(indent bool) *Encoder { // basis: // // toml:"foo" -// Changes the name of the key to use for the field to foo. +// Changes the name of the key to use for the field to foo. By default, all +// public fields are encoded. If you want to prevent a public field from +// being exported, you can use the special field name "-". // // multiline:"true" // When the field contains a string, it will be emitted as a quoted