Skip to content

Commit 872832d

Browse files
authored
chore(deps): replace golang.org/x/exp/slices with stdlib (#3075)
The experimental functions in `golang.org/x/exp/slices` are now available in the standard library in Go 1.21. Reference: https://go.dev/doc/go1.21#slices Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
1 parent 8235aa5 commit 872832d

3 files changed

Lines changed: 2 additions & 7 deletions

File tree

modulegen/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ toolchain go1.23.6
77
require (
88
github.com/spf13/cobra v1.8.0
99
github.com/stretchr/testify v1.9.0
10-
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb
1110
golang.org/x/mod v0.16.0
1211
golang.org/x/text v0.14.0
1312
gopkg.in/yaml.v3 v3.0.1

modulegen/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
1212
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
1313
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
1414
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
15-
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA=
16-
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
1715
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
1816
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
1917
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=

modulegen/internal/mkdocs/types.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package mkdocs
22

33
import (
4-
"sort"
4+
"slices"
55
"strings"
6-
7-
"golang.org/x/exp/slices"
86
)
97

108
type Config struct {
@@ -65,7 +63,7 @@ func (c *Config) addModule(isModule bool, moduleMd string, indexMd string) {
6563
}
6664

6765
navItems = append(navItems, moduleMd)
68-
sort.Strings(navItems)
66+
slices.Sort(navItems)
6967

7068
// prepend the index.md file
7169
navItems = append([]string{indexMd}, navItems...)

0 commit comments

Comments
 (0)