Add support for Lua input (#1810)

This commit is contained in:
Kim Alvefur
2023-10-03 16:00:51 +11:00
committed by GitHub
parent ee900ec997
commit 5fa41624c9
8 changed files with 301 additions and 2 deletions
+3
View File
@@ -18,6 +18,7 @@ const (
TSVObjectInputFormat
TomlInputFormat
UriInputFormat
LuaInputFormat
)
type Decoder interface {
@@ -41,6 +42,8 @@ func InputFormatFromString(format string) (InputFormat, error) {
return TSVObjectInputFormat, nil
case "toml":
return TomlInputFormat, nil
case "lua", "l":
return LuaInputFormat, nil
default:
return 0, fmt.Errorf("unknown format '%v' please use [yaml|json|props|csv|tsv|xml|toml]", format)
}