diff --git a/cmd/endpoint.go b/cmd/endpoint.go index 30af75657..c42160efa 100644 --- a/cmd/endpoint.go +++ b/cmd/endpoint.go @@ -80,7 +80,7 @@ func (endpoint Endpoint) SetHTTP() { func NewEndpoint(arg string) (Endpoint, error) { // isEmptyPath - check whether given path is not empty. isEmptyPath := func(path string) bool { - return path == "" || path == "." || path == "/" || path == `\` + return path == "" || path == "/" || path == `\` } if isEmptyPath(arg) { diff --git a/cmd/endpoint_test.go b/cmd/endpoint_test.go index 49736bd66..c01fd7a6c 100644 --- a/cmd/endpoint_test.go +++ b/cmd/endpoint_test.go @@ -62,7 +62,6 @@ func TestNewEndpoint(t *testing.T) { {"http://127.0.0.1:8080/path", Endpoint{URL: u3, IsLocal: true}, URLEndpointType, nil}, {"http://192.168.253.200/path", Endpoint{URL: u4}, URLEndpointType, nil}, {"", Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")}, - {".", Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")}, {"/", Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")}, {`\`, Endpoint{}, -1, fmt.Errorf("empty or root endpoint is not supported")}, {"c://foo", Endpoint{}, -1, fmt.Errorf("invalid URL endpoint format")},