Migrate golanglint-ci config to V2 (#21081)

This commit is contained in:
Taran Pelkey
2025-03-29 20:56:02 -04:00
committed by GitHub
parent b67f0cf721
commit e88d494775
77 changed files with 239 additions and 290 deletions
+8 -11
View File
@@ -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