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

Indent EncodeOption ignored when encoding ast.Node #614

Open
braydonk opened this issue Jan 10, 2025 · 0 comments
Open

Indent EncodeOption ignored when encoding ast.Node #614

braydonk opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@braydonk
Copy link
Contributor

Describe the bug
It seems that if I'm using an encoder to encode a ast.Node, the Indent EncodeOption is ignored in favour of the original indent of the node. Is there another way to change the indentation of the node on encode?

To Reproduce

https://go.dev/play/p/3bFW6s9BX6n

Expected behavior
I expected, given the indent option with a value of 4, to receive a 4-space indented yaml result.

Screenshots
If applicable, add screenshots to help explain your problem.

Version Variables

  • Go version: Doesn't seem to matter, but using go 1.23 at the moment
  • go-yaml's Version: tested on 1.15.13
@braydonk braydonk added the bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant