v2: chainable options API #582
Answered
by
pelletier
moorereason
asked this question in
Questions
-
v2 (40cfb6f) doesn't support chaining of configuration options when building an encoder/decoder. Was that intentional? For example, these two blocks accomplish the same thing: // v1
err := toml.NewEncoder(buf).ArraysWithOneElementPerLine(multi).Encode(v)
// v2
enc := toml.NewEncoder(buf)
enc.SetArraysMultiline(multi)
err := enc.Encode(v) |
Beta Was this translation helpful? Give feedback.
Answered by
pelletier
Sep 7, 2021
Replies: 1 comment 1 reply
-
This was not intentional! Adding this to the list of things to do after I figure out this Document feature. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
moorereason
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was not intentional! Adding this to the list of things to do after I figure out this Document feature.