Added scalar output for TOML (#1617)

This commit is contained in:
Mike Farah
2023-04-03 15:40:06 +10:00
parent a389bb64b8
commit eba075294a
5 changed files with 88 additions and 3 deletions
+3
View File
@@ -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)
}