mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -05:00
Remove unused functions and constants (#6175)
This commit is contained in:
parent
963a70053b
commit
36ab615518
@ -72,16 +72,6 @@ func newFormatFSV1() (format *formatFSV1) {
|
|||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the latest "fs" format V2
|
|
||||||
func newFormatFSV2() (format *formatFSV2) {
|
|
||||||
f := &formatFSV2{}
|
|
||||||
f.Version = formatMetaVersionV1
|
|
||||||
f.Format = formatBackendFS
|
|
||||||
f.ID = mustGetUUID()
|
|
||||||
f.FS.Version = formatFSVersionV2
|
|
||||||
return f
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns the field formatMetaV1.Format i.e the string "fs" which is never likely to change.
|
// Returns the field formatMetaV1.Format i.e the string "fs" which is never likely to change.
|
||||||
// We do not use this function in XL to get the format as the file is not fcntl-locked on XL.
|
// We do not use this function in XL to get the format as the file is not fcntl-locked on XL.
|
||||||
func formatMetaGetFormatBackendFS(r io.ReadSeeker) (string, error) {
|
func formatMetaGetFormatBackendFS(r io.ReadSeeker) (string, error) {
|
||||||
|
@ -380,7 +380,6 @@ var (
|
|||||||
logTag = "ERROR"
|
logTag = "ERROR"
|
||||||
logBanner = colorBgRed(colorFgWhite(colorBold(logTag))) + " "
|
logBanner = colorBgRed(colorFgWhite(colorBold(logTag))) + " "
|
||||||
emptyBanner = colorBgRed(strings.Repeat(" ", len(logTag))) + " "
|
emptyBanner = colorBgRed(strings.Repeat(" ", len(logTag))) + " "
|
||||||
minimumWidth = 80
|
|
||||||
bannerWidth = len(logTag) + 1
|
bannerWidth = len(logTag) + 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -120,12 +120,6 @@ Example 1:
|
|||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
uiErrUnableToReadFromBackend = newUIErrFn(
|
|
||||||
"Unable to read from the backend",
|
|
||||||
"Please ensure Minio binary has read permissions for the backend",
|
|
||||||
"",
|
|
||||||
)
|
|
||||||
|
|
||||||
uiErrPortAlreadyInUse = newUIErrFn(
|
uiErrPortAlreadyInUse = newUIErrFn(
|
||||||
"Port is already in use",
|
"Port is already in use",
|
||||||
"Please ensure no other program uses the same address/port",
|
"Please ensure no other program uses the same address/port",
|
||||||
|
@ -30,7 +30,6 @@ var (
|
|||||||
xForwardedPort = http.CanonicalHeaderKey("X-Forwarded-Port")
|
xForwardedPort = http.CanonicalHeaderKey("X-Forwarded-Port")
|
||||||
xForwardedProto = http.CanonicalHeaderKey("X-Forwarded-Proto")
|
xForwardedProto = http.CanonicalHeaderKey("X-Forwarded-Proto")
|
||||||
xForwardedScheme = http.CanonicalHeaderKey("X-Forwarded-Scheme")
|
xForwardedScheme = http.CanonicalHeaderKey("X-Forwarded-Scheme")
|
||||||
xForwardedServer = http.CanonicalHeaderKey("X-Forwarded-Server")
|
|
||||||
xRealIP = http.CanonicalHeaderKey("X-Real-IP")
|
xRealIP = http.CanonicalHeaderKey("X-Real-IP")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
* Minio Cloud Storage, (C) 2016 Minio, Inc.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package madmin
|
|
||||||
|
|
||||||
const (
|
|
||||||
// Unsigned payload.
|
|
||||||
unsignedPayload = "UNSIGNED-PAYLOAD"
|
|
||||||
)
|
|
@ -17,7 +17,6 @@
|
|||||||
package madmin
|
package madmin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/md5"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@ -38,13 +37,6 @@ func sum256(data []byte) []byte {
|
|||||||
return hash.Sum(nil)
|
return hash.Sum(nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// sumMD5 calculate sumMD5 sum for an input byte array.
|
|
||||||
func sumMD5(data []byte) []byte {
|
|
||||||
hash := md5.New()
|
|
||||||
hash.Write(data)
|
|
||||||
return hash.Sum(nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// jsonDecoder decode json to go type.
|
// jsonDecoder decode json to go type.
|
||||||
func jsonDecoder(body io.Reader, v interface{}) error {
|
func jsonDecoder(body io.Reader, v interface{}) error {
|
||||||
d := json.NewDecoder(body)
|
d := json.NewDecoder(body)
|
||||||
|
Loading…
Reference in New Issue
Block a user