go-yaml / yaml

YAML support for the Go language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows line endings issue

szymonGlomskiN opened this issue · comments

file.yaml

paramX:
  x: 1
  # first comment line
  # second comment line
  y:
var nodes yaml.Node
inData, _ := os.ReadFile("file.yaml")
_ = yaml.Unmarshal(inBytes, &nodes) 

When x has a value and file.yaml has windows line endings. first comment line is ommited in nodes