go-yaml / yaml

YAML support for the Go language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yml.Unmarshal It doesn't erase the previous content

le011 opened this issue · comments

commented

version:
go 1.18
gopkg.in/yaml.v2 v2.4.0

for example

//  content={name:lee,age:18} when i rm  name:lee from yml file
// `yml.Unmarshal` after  still get  content={name:lee,age:18} but  should content={age:18}