mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
check parseURI error for elasticsearch init (#752)
return error if it occurred when we parse elasticsearch url
This commit is contained in:
+2
-2
@@ -5,12 +5,11 @@ import (
|
||||
"log"
|
||||
"net/url"
|
||||
"strings"
|
||||
//"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/buger/goreplay/proto"
|
||||
|
||||
"github.com/mattbaird/elastigo/lib"
|
||||
elastigo "github.com/mattbaird/elastigo/lib"
|
||||
)
|
||||
|
||||
type ESUriErorr struct{}
|
||||
@@ -67,6 +66,7 @@ func parseURI(URI string) (err error, index string) {
|
||||
|
||||
if parseErr != nil {
|
||||
err = new(ESUriErorr)
|
||||
return
|
||||
}
|
||||
|
||||
// check URL validity by extracting host and undex values.
|
||||
|
||||
Reference in New Issue
Block a user