-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Customize yaml.Marshal wrap behavior #387
Comments
The added linebreaks were also unexpected for me (and causes the output not to work, in my case). Also found an earlier report about this behavior being unexpected (#348). The 80-character limit is set on the Encoder's emitter: Line 286 in 7c97801
I didn't see a way through the API to modify these settings, but I would definitely be excited to use one. |
This feature confuses me too. I use this package to modify ConfigMap of k8s, but after an 'Unmarshal' and a 'Marshal' operations, the configmap appears more differences than I except. Hope for some APIs to define these settings. |
The same issue with you guys. I Input:
Output:
Is there any standard length about the |
Since this is getting mentioned, v2.3.0 fixes this by setting the default line length limit to -1 or infinity - see #571 |
The
yaml.Marshal
appears to split long string values on to multiple lines. Is there any way to prevent this from happening?The text was updated successfully, but these errors were encountered: