File tree Expand file tree Collapse file tree 5 files changed +14
-23
lines changed Expand file tree Collapse file tree 5 files changed +14
-23
lines changed Original file line number Diff line number Diff line change 23
23
- name : Checkout code
24
24
uses : actions/checkout@v4
25
25
- name : Install Go
26
- uses : actions/setup-go@v4
26
+ uses : actions/setup-go@v5
27
27
with :
28
28
go-version : ${{ matrix.go-version }}
29
29
cache : false # our tests are quick enough
Original file line number Diff line number Diff line change 1
1
# With no .gomodproxy supporting files, we use the GOPROXY from
2
2
# the environment.
3
- # Note that Go 1.21 started quoting with single quotes in "go env",
4
- # where older versions used double quotes.
5
3
env GOPROXY=0.1.2.3
6
4
unquote file.txt
7
5
testscript -v file.txt
8
6
9
7
-- file.txt --
10
8
>go env
11
- >[!windows] stdout '^GOPROXY=[''"] 0.1.2.3[''"] $'
9
+ >[!windows] stdout '^GOPROXY='' 0.1.2.3'' $'
12
10
>[windows] stdout '^set GOPROXY=0.1.2.3$'
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/rogpeppe/go-internal
3
3
go 1.21
4
4
5
5
require (
6
- golang.org/x/mod v0.9 .0
7
- golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
8
- golang.org/x/tools v0.1.12
6
+ golang.org/x/mod v0.18 .0
7
+ golang.org/x/sys v0.21.0
8
+ golang.org/x/tools v0.22.0
9
9
)
Original file line number Diff line number Diff line change 1
- golang.org/x/mod v0.9 .0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs =
2
- golang.org/x/mod v0.9 .0 /go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs =
3
- golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s =
4
- golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
5
- golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU =
6
- golang.org/x/tools v0.1.12 /go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc =
1
+ golang.org/x/mod v0.18 .0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0 =
2
+ golang.org/x/mod v0.18 .0 /go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c =
3
+ golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws =
4
+ golang.org/x/sys v0.21.0 /go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA =
5
+ golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA =
6
+ golang.org/x/tools v0.22.0 /go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c =
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import (
21
21
"path/filepath"
22
22
"regexp"
23
23
"runtime"
24
- "sort "
24
+ "slices "
25
25
"strings"
26
26
"sync/atomic"
27
27
"syscall"
@@ -754,15 +754,8 @@ func (ts *TestScript) cmdSuggestions(name string) []string {
754
754
return nil
755
755
}
756
756
// deduplicate candidates
757
- // TODO: Use slices.Compact (and maybe slices.Sort) once we can use Go 1.21
758
- sort .Strings (candidates )
759
- out := candidates [:1 ]
760
- for _ , c := range candidates [1 :] {
761
- if out [len (out )- 1 ] == c {
762
- out = append (out , c )
763
- }
764
- }
765
- return out
757
+ slices .Sort (candidates )
758
+ return slices .Compact (candidates )
766
759
}
767
760
768
761
func (ts * TestScript ) applyScriptUpdates () {
You can’t perform that action at this time.
0 commit comments