Draft: Toml (#1439)

* toml wip

* wip

* Fixed auto parsing toml

* Added build flag not to include toml

* Parse toml docs and tests

* minor updates
This commit is contained in:
Mike Farah
2023-03-26 10:59:15 +11:00
committed by GitHub
parent 47f4ddc910
commit 7103b78d38
16 changed files with 828 additions and 23 deletions
+4 -1
View File
@@ -16,6 +16,7 @@ const (
JsonInputFormat
CSVObjectInputFormat
TSVObjectInputFormat
TomlInputFormat
UriInputFormat
)
@@ -38,8 +39,10 @@ func InputFormatFromString(format string) (InputFormat, error) {
return CSVObjectInputFormat, nil
case "tsv", "t":
return TSVObjectInputFormat, nil
case "toml":
return TomlInputFormat, nil
default:
return 0, fmt.Errorf("unknown format '%v' please use [yaml|json|props|csv|tsv|xml]", format)
return 0, fmt.Errorf("unknown format '%v' please use [yaml|json|props|csv|tsv|xml|toml]", format)
}
}