From e90b00957ba818b15284069b7bed2271cabba1ec Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Thu, 11 Jun 2020 09:58:10 +1000 Subject: [PATCH] Added missing flow style --- pkg/yqlib/value_parser.go | 2 ++ pkg/yqlib/value_parser_test.go | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/yqlib/value_parser.go b/pkg/yqlib/value_parser.go index 85a73635..9c7d517b 100644 --- a/pkg/yqlib/value_parser.go +++ b/pkg/yqlib/value_parser.go @@ -27,6 +27,8 @@ func (v *valueParser) Parse(argument string, customTag string, customStyle strin style = yaml.LiteralStyle } else if customStyle == "folded" { style = yaml.FoldedStyle + } else if customStyle == "flow" { + style = yaml.FlowStyle } else if customStyle != "" { log.Error("Unknown style %v, ignoring", customStyle) } diff --git a/pkg/yqlib/value_parser_test.go b/pkg/yqlib/value_parser_test.go index a185999b..130bf87d 100644 --- a/pkg/yqlib/value_parser_test.go +++ b/pkg/yqlib/value_parser_test.go @@ -16,6 +16,7 @@ var parseStyleTests = []struct { {"double", yaml.DoubleQuotedStyle}, {"single", yaml.SingleQuotedStyle}, {"folded", yaml.FoldedStyle}, + {"flow", yaml.FlowStyle}, {"literal", yaml.LiteralStyle}, }