mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
Restructre AppSetting and address comments.
This commit is contained in:
+3
-3
@@ -15,7 +15,7 @@ import (
|
||||
type ESUriErorr struct{}
|
||||
|
||||
func (e *ESUriErorr) Error() string {
|
||||
return "Wrong ElasticSearch URL format. Expected to be: scheme://Host/index_name"
|
||||
return "Wrong ElasticSearch URL format. Expected to be: scheme://host/index_name"
|
||||
}
|
||||
|
||||
type ESPlugin struct {
|
||||
@@ -55,7 +55,7 @@ type ESRequestResponse struct {
|
||||
|
||||
// Parse ElasticSearch URI
|
||||
//
|
||||
// Proper format is: scheme://[userinfo@]Host/index_name
|
||||
// Proper format is: scheme://[userinfo@]host/index_name
|
||||
// userinfo is: user[:password]
|
||||
// net/url.Parse() does not fail if scheme is not provided but actualy does not
|
||||
// handle URI properly.
|
||||
@@ -69,7 +69,7 @@ func parseURI(URI string) (err error, index string) {
|
||||
return
|
||||
}
|
||||
|
||||
// check URL validity by extracting Host and undex values.
|
||||
// check URL validity by extracting host and index values.
|
||||
host := parsedUrl.Host
|
||||
urlPathParts := strings.Split(parsedUrl.Path, "/")
|
||||
index = urlPathParts[len(urlPathParts)-1]
|
||||
|
||||
Reference in New Issue
Block a user