1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00

Use single/double instead of singleQuoted/doubleQuoted

This commit is contained in:
Mike Farah
2020-04-17 11:24:45 +10:00
parent 06d8715cbe
commit 64135a16e1
4 changed files with 10 additions and 8 deletions

View File

@@ -19,14 +19,16 @@ func (v *valueParser) Parse(argument string, customTag string, customStyle strin
var style yaml.Style
if customStyle == "tagged" {
style = yaml.TaggedStyle
} else if customStyle == "doubleQuoted" {
} else if customStyle == "double" {
style = yaml.DoubleQuotedStyle
} else if customStyle == "singleQuoted" {
} else if customStyle == "single" {
style = yaml.SingleQuotedStyle
} else if customStyle == "literal" {
style = yaml.LiteralStyle
} else if customStyle == "folded" {
style = yaml.FoldedStyle
} else if customStyle != "" {
log.Error("Unknown style %v, ignoring", customStyle)
}
if argument == "[]" {

View File

@@ -13,8 +13,8 @@ var parseStyleTests = []struct {
}{
{"", 0},
{"tagged", yaml.TaggedStyle},
{"doubleQuoted", yaml.DoubleQuotedStyle},
{"singleQuoted", yaml.SingleQuotedStyle},
{"double", yaml.DoubleQuotedStyle},
{"single", yaml.SingleQuotedStyle},
{"folded", yaml.FoldedStyle},
{"literal", yaml.LiteralStyle},
}