Remove all unused variables and functions (#5823)

This commit is contained in:
Harshavardhana
2018-04-15 06:56:04 -07:00
committed by Nitish Tiwari
parent 97a8d856b6
commit adf9a9d300
14 changed files with 29 additions and 99 deletions

View File

@@ -233,6 +233,18 @@ func TestStartProfiler(t *testing.T) {
}
}
// checkURL - checks if passed address correspond
func checkURL(urlStr string) (*url.URL, error) {
if urlStr == "" {
return nil, errors.New("Address cannot be empty")
}
u, err := url.Parse(urlStr)
if err != nil {
return nil, fmt.Errorf("`%s` invalid: %s", urlStr, err.Error())
}
return u, nil
}
// TestCheckURL tests valid url.
func TestCheckURL(t *testing.T) {
testCases := []struct {