Skip to content

Commit 78b5cb7

Browse files
authored
Upgrade dependencies, remove toolchain (#2189)
1 parent 5b1654c commit 78b5cb7

File tree

4 files changed

+35
-109
lines changed

4 files changed

+35
-109
lines changed

.github/workflows/vulncheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
go-version: [ 1.24.x ]
17+
go-version: [ 1.25.x ]
1818
steps:
1919
- name: Check out code into the Go module directory
2020
uses: actions/checkout@v4

go.mod

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,25 @@ module github.com/minio/minio-go/v7
22

33
go 1.24.0
44

5-
toolchain go1.25.5
6-
75
require (
86
github.com/dustin/go-humanize v1.0.1
97
github.com/go-ini/ini v1.67.0
108
github.com/google/uuid v1.6.0
11-
github.com/klauspost/compress v1.18.0
9+
github.com/klauspost/compress v1.18.2
1210
github.com/klauspost/crc32 v1.3.0
13-
github.com/minio/crc64nvme v1.1.0
11+
github.com/minio/crc64nvme v1.1.1
1412
github.com/minio/md5-simd v1.1.2
1513
github.com/rs/xid v1.6.0
16-
github.com/tinylib/msgp v1.3.0
14+
github.com/tinylib/msgp v1.6.1
1715
go.yaml.in/yaml/v3 v3.0.4
18-
golang.org/x/crypto v0.36.0
19-
golang.org/x/net v0.38.0
16+
golang.org/x/crypto v0.46.0
17+
golang.org/x/net v0.48.0
2018
)
2119

2220
require (
2321
github.com/klauspost/cpuid/v2 v2.2.11 // indirect
2422
github.com/philhofer/fwd v1.2.0 // indirect
2523
github.com/stretchr/testify v1.9.0 // indirect
26-
golang.org/x/sys v0.38.0 // indirect
27-
golang.org/x/text v0.31.0 // indirect
24+
golang.org/x/sys v0.39.0 // indirect
25+
golang.org/x/text v0.32.0 // indirect
2826
)

go.sum

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
66
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
77
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
88
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
9-
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
10-
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
9+
github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk=
10+
github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
1111
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
1212
github.com/klauspost/cpuid/v2 v2.2.11 h1:0OwqZRYI2rFrjS4kvkDnqJkKHdHaRnCm68/DY4OxRzU=
1313
github.com/klauspost/cpuid/v2 v2.2.11/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
1414
github.com/klauspost/crc32 v1.3.0 h1:sSmTt3gUt81RP655XGZPElI0PelVTZ6YwCRnPSupoFM=
1515
github.com/klauspost/crc32 v1.3.0/go.mod h1:D7kQaZhnkX/Y0tstFGf8VUzv2UofNGqCjnC3zdHB0Hw=
16-
github.com/minio/crc64nvme v1.1.0 h1:e/tAguZ+4cw32D+IO/8GSf5UVr9y+3eJcxZI2WOO/7Q=
17-
github.com/minio/crc64nvme v1.1.0/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg=
16+
github.com/minio/crc64nvme v1.1.1 h1:8dwx/Pz49suywbO+auHCBpCtlW1OfpcLN7wYgVR6wAI=
17+
github.com/minio/crc64nvme v1.1.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg=
1818
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
1919
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
2020
github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
@@ -25,18 +25,18 @@ github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
2525
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
2626
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
2727
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
28-
github.com/tinylib/msgp v1.3.0 h1:ULuf7GPooDaIlbyvgAxBV/FI7ynli6LZ1/nVUNu+0ww=
29-
github.com/tinylib/msgp v1.3.0/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0=
28+
github.com/tinylib/msgp v1.6.1 h1:ESRv8eL3u+DNHUoSAAQRE50Hm162zqAnBoGv9PzScPY=
29+
github.com/tinylib/msgp v1.6.1/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA=
3030
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
3131
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
32-
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
33-
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
34-
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
35-
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
36-
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
37-
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
38-
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
39-
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
32+
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
33+
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
34+
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
35+
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
36+
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
37+
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
38+
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
39+
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
4040
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
4141
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
4242
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

pkg/set/msgp.go

Lines changed: 13 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -17,119 +17,47 @@
1717

1818
package set
1919

20-
import "github.com/tinylib/msgp/msgp"
20+
import (
21+
"github.com/tinylib/msgp/msgp"
22+
"github.com/tinylib/msgp/msgp/setof"
23+
)
2124

2225
// EncodeMsg encodes the message to the writer.
2326
// Values are stored as a slice of strings or nil.
2427
func (s StringSet) EncodeMsg(writer *msgp.Writer) error {
25-
if s == nil {
26-
return writer.WriteNil()
27-
}
28-
err := writer.WriteArrayHeader(uint32(len(s)))
29-
if err != nil {
30-
return err
31-
}
32-
sorted := s.ToByteSlices()
33-
for _, k := range sorted {
34-
err = writer.WriteStringFromBytes(k)
35-
if err != nil {
36-
return err
37-
}
38-
}
39-
return nil
28+
return setof.StringSorted(s).EncodeMsg(writer)
4029
}
4130

4231
// MarshalMsg encodes the message to the bytes.
4332
// Values are stored as a slice of strings or nil.
4433
func (s StringSet) MarshalMsg(bytes []byte) ([]byte, error) {
45-
if s == nil {
46-
return msgp.AppendNil(bytes), nil
47-
}
48-
if len(s) == 0 {
49-
return msgp.AppendArrayHeader(bytes, 0), nil
50-
}
51-
bytes = msgp.AppendArrayHeader(bytes, uint32(len(s)))
52-
sorted := s.ToByteSlices()
53-
for _, k := range sorted {
54-
bytes = msgp.AppendStringFromBytes(bytes, k)
55-
}
56-
return bytes, nil
34+
return setof.StringSorted(s).MarshalMsg(bytes)
5735
}
5836

5937
// DecodeMsg decodes the message from the reader.
6038
func (s *StringSet) DecodeMsg(reader *msgp.Reader) error {
61-
if reader.IsNil() {
62-
*s = nil
63-
return reader.Skip()
64-
}
65-
sz, err := reader.ReadArrayHeader()
66-
if err != nil {
39+
var ss setof.String
40+
if err := ss.DecodeMsg(reader); err != nil {
6741
return err
6842
}
69-
dst := *s
70-
if dst == nil {
71-
dst = make(StringSet, sz)
72-
} else {
73-
for k := range dst {
74-
delete(dst, k)
75-
}
76-
}
77-
for i := uint32(0); i < sz; i++ {
78-
var k string
79-
k, err = reader.ReadString()
80-
if err != nil {
81-
return err
82-
}
83-
dst[k] = struct{}{}
84-
}
85-
*s = dst
43+
*s = StringSet(ss)
8644
return nil
8745
}
8846

8947
// UnmarshalMsg decodes the message from the bytes.
9048
func (s *StringSet) UnmarshalMsg(bytes []byte) ([]byte, error) {
91-
if msgp.IsNil(bytes) {
92-
*s = nil
93-
return bytes[msgp.NilSize:], nil
94-
}
95-
// Read the array header
96-
sz, bytes, err := msgp.ReadArrayHeaderBytes(bytes)
49+
var ss setof.String
50+
bytes, err := ss.UnmarshalMsg(bytes)
9751
if err != nil {
9852
return nil, err
9953
}
100-
dst := *s
101-
if dst == nil {
102-
dst = make(StringSet, sz)
103-
} else {
104-
for k := range dst {
105-
delete(dst, k)
106-
}
107-
}
108-
for i := uint32(0); i < sz; i++ {
109-
var k string
110-
k, bytes, err = msgp.ReadStringBytes(bytes)
111-
if err != nil {
112-
return nil, err
113-
}
114-
dst[k] = struct{}{}
115-
}
116-
*s = dst
54+
*s = StringSet(ss)
11755
return bytes, nil
11856
}
11957

12058
// Msgsize returns the maximum size of the message.
12159
func (s StringSet) Msgsize() int {
122-
if s == nil {
123-
return msgp.NilSize
124-
}
125-
if len(s) == 0 {
126-
return msgp.ArrayHeaderSize
127-
}
128-
size := msgp.ArrayHeaderSize
129-
for key := range s {
130-
size += msgp.StringPrefixSize + len(key)
131-
}
132-
return size
60+
return setof.String(s).Msgsize()
13361
}
13462

13563
// MarshalBinary encodes the receiver into a binary form and returns the result.

0 commit comments

Comments
 (0)