mirror of
https://github.com/pgsty/minio.git
synced 2026-07-15 16:30:29 +03:00
Migrate golanglint-ci config to V2 (#21081)
This commit is contained in:
+8
-11
@@ -226,10 +226,7 @@ func prepareErasure(ctx context.Context, nDisks int) (ObjectLayer, []string, err
|
||||
for _, sets := range pool.erasureDisks {
|
||||
for _, s := range sets {
|
||||
if !s.IsLocal() {
|
||||
for {
|
||||
if s.IsOnline() {
|
||||
break
|
||||
}
|
||||
for !s.IsOnline() {
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
if time.Since(t) > 10*time.Second {
|
||||
return nil, nil, errors.New("timeout waiting for disk to come online")
|
||||
@@ -642,8 +639,8 @@ func signStreamingRequest(req *http.Request, accessKey, secretKey string, currTi
|
||||
for _, k := range headers {
|
||||
buf.WriteString(k)
|
||||
buf.WriteByte(':')
|
||||
switch {
|
||||
case k == "host":
|
||||
switch k {
|
||||
case "host":
|
||||
buf.WriteString(req.URL.Host)
|
||||
fallthrough
|
||||
default:
|
||||
@@ -996,8 +993,8 @@ func signRequestV4(req *http.Request, accessKey, secretKey string) error {
|
||||
for _, k := range headers {
|
||||
buf.WriteString(k)
|
||||
buf.WriteByte(':')
|
||||
switch {
|
||||
case k == "host":
|
||||
switch k {
|
||||
case "host":
|
||||
buf.WriteString(req.URL.Host)
|
||||
fallthrough
|
||||
default:
|
||||
@@ -1089,8 +1086,8 @@ func newTestRequest(method, urlStr string, contentLength int64, body io.ReadSeek
|
||||
// Save for subsequent use
|
||||
var hashedPayload string
|
||||
var md5Base64 string
|
||||
switch {
|
||||
case body == nil:
|
||||
switch body {
|
||||
case nil:
|
||||
hashedPayload = getSHA256Hash([]byte{})
|
||||
default:
|
||||
payloadBytes, err := io.ReadAll(body)
|
||||
@@ -2393,7 +2390,7 @@ func unzipArchive(zipFilePath, targetDir string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, file := range zipReader.Reader.File {
|
||||
for _, file := range zipReader.File {
|
||||
zippedFile, err := file.Open()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user