go-toml
go-toml copied to clipboard
Apply multiline tag to value instead of container for non-arrays
Discussed in https://github.com/pelletier/go-toml/discussions/823
Instead of multiline
being a no-op when used on non-string or non-array, it should be pushed down for the value if it is an array. I think this would match people's expectations, as seen in the discussion.
For a case like this:
struct {
Field map[string][][]string `toml:",multiline"`
}
it should only make the outer array multiline. Maybe at some point we'll need a different API for those who want more granular control to emit toml.