Rearrange comments for yaml/V3 bug fix

This commit is contained in:
Phani Teja Marupaka
2020-03-30 01:00:49 -07:00
parent 50cc1968e4
commit 17503ae9d8
5 changed files with 92 additions and 7 deletions

View File

@@ -496,6 +496,7 @@ func String(node *yaml.Node, opts ...string) (string, error) {
if node == nil {
return "", nil
}
DoSerializationHacks(node)
optsSet := sets.String{}
optsSet.Insert(opts...)
if optsSet.Has(Flow) {
@@ -514,6 +515,7 @@ func String(node *yaml.Node, opts ...string) (string, error) {
if optsSet.Has(Trim) {
val = strings.TrimSpace(val)
}
UndoSerializationHacks(node)
return val, errors.Wrap(err)
}