Simplify parsing

This commit is contained in:
Phani Teja Marupaka
2020-06-19 17:17:32 -07:00
parent e994b3b566
commit 28307bc435
13 changed files with 47 additions and 98 deletions

View File

@@ -497,7 +497,6 @@ 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) {
@@ -516,7 +515,6 @@ func String(node *yaml.Node, opts ...string) (string, error) {
if optsSet.Has(Trim) {
val = strings.TrimSpace(val)
}
UndoSerializationHacks(node)
return val, errors.Wrap(err)
}