mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Added scalar output for TOML (#1617)
This commit is contained in:
@@ -31,6 +31,7 @@ const (
|
||||
Base64OutputFormat
|
||||
UriOutputFormat
|
||||
ShOutputFormat
|
||||
TomlOutputFormat
|
||||
)
|
||||
|
||||
func OutputFormatFromString(format string) (PrinterOutputFormat, error) {
|
||||
@@ -47,6 +48,8 @@ func OutputFormatFromString(format string) (PrinterOutputFormat, error) {
|
||||
return TSVOutputFormat, nil
|
||||
case "xml", "x":
|
||||
return XMLOutputFormat, nil
|
||||
case "toml":
|
||||
return TomlOutputFormat, nil
|
||||
default:
|
||||
return 0, fmt.Errorf("unknown format '%v' please use [yaml|json|props|csv|tsv|xml]", format)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user