提交 f502d455 编写于 作者: L lakhansamani

feat: add jsonl file check

上级 9120f6bb
...@@ -18,8 +18,11 @@ ...@@ -18,8 +18,11 @@
/test*.csv /test*.csv
/test*.env /test*.env
/test*.json /test*.json
/test*.jsonl
*.jsonl
*.json *.json
*.csv *.csv
temp
# es log # es log
/elastic.log /elastic.log
......
...@@ -206,7 +206,7 @@ func writeConfigFile(srcConfig map[string]interface{}, destConfig map[string]int ...@@ -206,7 +206,7 @@ func writeConfigFile(srcConfig map[string]interface{}, destConfig map[string]int
} }
} }
// check file path as source [json, csv] // check file path as source [json, csv]
if common.StringInSlice(srcConfig["_name_"].(string), []string{"json", "csv"}) { if common.StringInSlice(srcConfig["_name_"].(string), []string{"json", "csv", "jsonl"}) {
err = common.IsFileValid(srcConfig["uri"].(string)) err = common.IsFileValid(srcConfig["uri"].(string))
if err != nil { if err != nil {
return "", nil, err return "", nil, err
...@@ -355,4 +355,3 @@ func verifyConnectionsWithoutDestination(srcConfig map[string]interface{}) error ...@@ -355,4 +355,3 @@ func verifyConnectionsWithoutDestination(srcConfig map[string]interface{}) error
} }
return nil return nil
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册