Skip to content

[for yq] Blank value turns into null string #710

@mikefarah

Description

@mikefarah

Describe the bug
When parsing

test:

The lib turns this into

test: null

Note: I know that this is effectively what a blank value is - however I'm trying to keep as much formatting and comments as possible for roundtrip edits :)

To Reproduce
https://go.dev/play/p/74-SagRMZwO

Expected behavior

Keeps the actual null value used (blank)

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

Version Variables

  • Go version: [e.g. 1.21 ]
  • go-yaml's Version: [e.g. v1.11.1 ]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingparser

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions