处理yaml.v2与yaml.v3的不兼容
This commit is contained in:
parent
b5f23d13b8
commit
65ea58229e
1
file.go
1
file.go
@ -212,7 +212,6 @@ func (f *fileOperate) ReadForYaml(receiver interface{}) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
decoder := yaml.NewDecoder(bytes.NewReader(content))
|
decoder := yaml.NewDecoder(bytes.NewReader(content))
|
||||||
decoder.SetStrict(true)
|
|
||||||
return decoder.Decode(receiver)
|
return decoder.Decode(receiver)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user