From f502d4559f9bef4e8cdbdacdd8e9e7c99fddd352 Mon Sep 17 00:00:00 2001 From: lakhansamani Date: Thu, 30 Jul 2020 08:42:27 +0530 Subject: [PATCH] feat: add jsonl file check --- .gitignore | 3 +++ cmd/abc/appbase_import.go | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c379fdc..5c1487a 100755 --- a/.gitignore +++ b/.gitignore @@ -18,8 +18,11 @@ /test*.csv /test*.env /test*.json +/test*.jsonl +*.jsonl *.json *.csv +temp # es log /elastic.log diff --git a/cmd/abc/appbase_import.go b/cmd/abc/appbase_import.go index 7b854ac..1ba497b 100644 --- a/cmd/abc/appbase_import.go +++ b/cmd/abc/appbase_import.go @@ -206,7 +206,7 @@ func writeConfigFile(srcConfig map[string]interface{}, destConfig map[string]int } } // 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)) if err != nil { return "", nil, err @@ -355,4 +355,3 @@ func verifyConnectionsWithoutDestination(srcConfig map[string]interface{}) error } return nil } - -- GitLab