mirror of
https://github.com/minio/minio.git
synced 2025-02-03 18:06:00 -05:00
chore: fix minor issues reported via staticcheck (#17639)
This commit is contained in:
parent
6dc55fe5ed
commit
f80b6926d3
@ -513,7 +513,7 @@ func (cr *s3ChunkedReader) readTrailers() error {
|
||||
wantSig := cr.getTrailerChunkSignature()
|
||||
if !compareSignatureV4(string(sig), wantSig) {
|
||||
if cr.debug {
|
||||
fmt.Printf("signature, want: %q, got %q\nSignature buffer: %q\n", wantSig, string(sig), string(valueBuffer.Bytes()))
|
||||
fmt.Printf("signature, want: %q, got %q\nSignature buffer: %q\n", wantSig, string(sig), valueBuffer.String())
|
||||
}
|
||||
return errSignatureMismatch
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ import (
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/url"
|
||||
"os"
|
||||
@ -97,7 +96,7 @@ type localDisk struct {
|
||||
func getMajorMinor(path string) (string, error) {
|
||||
var stat syscall.Stat_t
|
||||
if err := syscall.Stat(path, &stat); err != nil {
|
||||
return "", fmt.Errorf("unable to stat `%s`: %w", err)
|
||||
return "", fmt.Errorf("unable to stat `%s`: %w", path, err)
|
||||
}
|
||||
|
||||
major := (stat.Dev & 0x00000000000fff00) >> 8
|
||||
@ -137,7 +136,7 @@ func filterLocalDisks(node, args string) ([]localDisk, error) {
|
||||
}
|
||||
|
||||
func getFormatJSON(path string) (format, error) {
|
||||
formatJSON, err := ioutil.ReadFile(filepath.Join(path, ".minio.sys/format.json"))
|
||||
formatJSON, err := os.ReadFile(filepath.Join(path, ".minio.sys/format.json"))
|
||||
if err != nil {
|
||||
return format{}, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user