mirror of
https://github.com/minio/minio.git
synced 2025-01-25 21:53:16 -05:00
Removing unused getUpdateReaderFromFile function (#15794)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
parent
3c605c93fe
commit
4bdf41a6c7
@ -457,18 +457,6 @@ func getDownloadURL(releaseTag string) (downloadURL string) {
|
|||||||
return minioReleaseURL + "minio"
|
return minioReleaseURL + "minio"
|
||||||
}
|
}
|
||||||
|
|
||||||
func getUpdateReaderFromFile(u *url.URL) (io.ReadCloser, error) {
|
|
||||||
r, err := os.Open(u.Path)
|
|
||||||
if err != nil {
|
|
||||||
return nil, AdminError{
|
|
||||||
Code: AdminUpdateUnexpectedFailure,
|
|
||||||
Message: err.Error(),
|
|
||||||
StatusCode: http.StatusInternalServerError,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return r, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func getUpdateReaderFromURL(u *url.URL, transport http.RoundTripper, mode string) (io.ReadCloser, error) {
|
func getUpdateReaderFromURL(u *url.URL, transport http.RoundTripper, mode string) (io.ReadCloser, error) {
|
||||||
clnt := &http.Client{
|
clnt := &http.Client{
|
||||||
Transport: transport,
|
Transport: transport,
|
||||||
@ -514,10 +502,7 @@ func downloadBinary(u *url.URL, mode string) (readerReturn []byte, err error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
reader, err = getUpdateReaderFromFile(u)
|
return nil, fmt.Errorf("unsupported protocol scheme: %s", u.Scheme)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert a Reader to bytes
|
// convert a Reader to bytes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user