mirror of
https://github.com/minio/mc.git
synced 2025-11-14 23:42:27 +03:00
Removing more dead code
This commit is contained in:
@@ -105,25 +105,6 @@ func fixFileURL(urlStr string) (fixedURL string, err error) {
|
||||
|
||||
}
|
||||
|
||||
// url2Host extracts hostname from the URL.
|
||||
func url2Host(urlStr string) (host string, err error) {
|
||||
if urlStr == "" {
|
||||
return "", iodine.New(errEmptyURL, nil)
|
||||
}
|
||||
|
||||
utype, e := getURLType(urlStr)
|
||||
if e != nil || utype != urlFile {
|
||||
return "", iodine.New(e, nil)
|
||||
}
|
||||
|
||||
u, e := url.Parse(urlStr)
|
||||
if e != nil {
|
||||
return "", iodine.New(e, nil)
|
||||
}
|
||||
|
||||
return u.Host, nil
|
||||
}
|
||||
|
||||
// url2Object converts URL to bucket and objectname
|
||||
func url2Object(urlStr string) (bucketName, objectName string, err error) {
|
||||
u, err := url.Parse(urlStr)
|
||||
|
||||
Reference in New Issue
Block a user