Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply multiline tag to value instead of container for non-arrays #828

Open
pelletier opened this issue Oct 30, 2022 Discussed in #823 · 0 comments
Open

Apply multiline tag to value instead of container for non-arrays #828

pelletier opened this issue Oct 30, 2022 Discussed in #823 · 0 comments
Labels
feature Issue asking for a new feature in go-toml.

Comments

@pelletier
Copy link
Owner

Discussed in #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.

@pelletier pelletier added the feature Issue asking for a new feature in go-toml. label Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue asking for a new feature in go-toml.
Projects
None yet
Development

No branches or pull requests

1 participant