提交 3bb510e8 编写于 作者: H Harsh Patel

Removed redundant checks

上级 0ce50300
......@@ -341,24 +341,6 @@ func verifyConnections(adaptors map[string]adaptor.Adaptor) error {
}
func verifyConnectionsWithoutDestination(srcConfig map[string]interface{}) error {
// check appname as source uri
if (!strings.Contains(srcConfig["uri"].(string), "/")) && srcConfig["_name_"].(string) == "elasticsearch" {
var sourceErr error
srcConfig["uri"], sourceErr = app.GetAppURL(srcConfig["uri"].(string))
if sourceErr != nil {
return sourceErr
}
}
// check file path as source [json, csv]
if common.StringInSlice(srcConfig["_name_"].(string), []string{"json", "csv"}) {
var filePathErr error
filePathErr = common.IsFileValid(srcConfig["uri"].(string))
if filePathErr != nil {
return filePathErr
}
}
var config = make(map[string]interface{})
for k, v := range srcConfig {
config[k] = v
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册