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:
@@ -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 == "[]" {
|
||||
|
||||
@@ -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},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user