1
0
mirror of https://github.com/minio/mc.git synced 2025-04-18 10:04:03 +03:00

Fix vet check (#5134)

... and pin toolchain.
This commit is contained in:
Klaus Post 2025-02-12 08:36:32 -08:00 committed by GitHub
parent 859c5989a1
commit e97f4324d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View File

@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.4
go-version: 1.23.6
- name: Get official govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
shell: bash

View File

@ -26,7 +26,7 @@ import (
"net/http/httptest"
"strconv"
minio "github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7"
checkv1 "gopkg.in/check.v1"
)
@ -181,13 +181,12 @@ func (h stsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Server", "MinIO")
w.Write(response)
return
} else {
response := []byte("<ErrorResponse xmlns=\"https://sts.amazonaws.com/doc/2011-06-15/\"><Error><Type></Type><Code>AccessDenied</Code><Message>Access denied: Invalid Token</Message></Error><RequestId></RequestId></ErrorResponse>")
w.Header().Set("Content-Length", strconv.Itoa(len(response)))
w.Header().Set("Content-Type", "application/xml")
w.Write(response)
return
}
response := []byte("<ErrorResponse xmlns=\"https://sts.amazonaws.com/doc/2011-06-15/\"><Error><Type></Type><Code>AccessDenied</Code><Message>Access denied: Invalid Token</Message></Error><RequestId></RequestId></ErrorResponse>")
w.Header().Set("Content-Length", strconv.Itoa(len(response)))
w.Header().Set("Content-Type", "application/xml")
w.Write(response)
return
}
}

2
go.mod
View File

@ -2,6 +2,8 @@ module github.com/minio/mc
go 1.23
toolchain go1.23.6
require (
github.com/charmbracelet/bubbles v0.20.0
github.com/charmbracelet/bubbletea v1.2.4