mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 04:30:26 +03:00
fix: satisfy stricter Go 1.26.1 linter checks
Go 1.26.1 tightens a few toolchain checks that older builds tolerated.\n\nCast aliased replication status values back to their defining type before calling the generated msgp helpers, and replace Sprintf+WriteString pairs with direct Fprintf calls where needed.\n\nThese are compatibility-only source changes to keep the cmd package building cleanly under the newer linker/toolchain.
This commit is contained in:
+4
-4
@@ -2128,7 +2128,7 @@ func (s *TestSuiteCommon) TestGetObjectLarge10MiB(c *check) {
|
||||
1234567890,1234567890,1234567890,1234567890,1234567890,123"`
|
||||
// Create 10MiB content where each line contains 1024 characters.
|
||||
for i := range 10 * 1024 {
|
||||
buffer.WriteString(fmt.Sprintf("[%05d] %s\n", i, line))
|
||||
fmt.Fprintf(&buffer, "[%05d] %s\n", i, line)
|
||||
}
|
||||
putContent := buffer.String()
|
||||
|
||||
@@ -2190,7 +2190,7 @@ func (s *TestSuiteCommon) TestGetObjectLarge11MiB(c *check) {
|
||||
1234567890,1234567890,1234567890,123`
|
||||
// Create 11MiB content where each line contains 1024 characters.
|
||||
for i := range 11 * 1024 {
|
||||
buffer.WriteString(fmt.Sprintf("[%05d] %s\n", i, line))
|
||||
fmt.Fprintf(&buffer, "[%05d] %s\n", i, line)
|
||||
}
|
||||
putMD5 := getMD5Hash(buffer.Bytes())
|
||||
|
||||
@@ -2341,7 +2341,7 @@ func (s *TestSuiteCommon) TestGetPartialObjectLarge11MiB(c *check) {
|
||||
// Create 11MiB content where each line contains 1024
|
||||
// characters.
|
||||
for i := range 11 * 1024 {
|
||||
buffer.WriteString(fmt.Sprintf("[%05d] %s\n", i, line))
|
||||
fmt.Fprintf(&buffer, "[%05d] %s\n", i, line)
|
||||
}
|
||||
putContent := buffer.String()
|
||||
|
||||
@@ -2407,7 +2407,7 @@ func (s *TestSuiteCommon) TestGetPartialObjectLarge10MiB(c *check) {
|
||||
1234567890,1234567890,1234567890,123`
|
||||
// Create 10MiB content where each line contains 1024 characters.
|
||||
for i := range 10 * 1024 {
|
||||
buffer.WriteString(fmt.Sprintf("[%05d] %s\n", i, line))
|
||||
fmt.Fprintf(&buffer, "[%05d] %s\n", i, line)
|
||||
}
|
||||
|
||||
putContent := buffer.String()
|
||||
|
||||
Reference in New Issue
Block a user