Skip to content

Commit 66d1a7a

Browse files
committed
add Go 1.20, drop 1.18
While here, clean up code to support older versions of Go. Note that none of these changes should explicitly break Go 1.18.
1 parent f53b991 commit 66d1a7a

File tree

8 files changed

+5
-52
lines changed

8 files changed

+5
-52
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
go-version:
15-
- '1.18.x'
1615
- '1.19.x'
16+
- '1.20.x'
1717
os:
1818
- ubuntu-latest
1919
- macos-11
@@ -32,7 +32,7 @@ jobs:
3232
go test -race ./...
3333
3434
- name: Tidy
35-
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.19.x' # no need to do this everywhere
35+
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.20.x' # no need to do this everywhere
3636
run: |
3737
go mod tidy
3838

cmd/testscript/testdata/env_var_with_go.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ unquote withproxy.txt
1313
testscript -v noproxy.txt
1414
stdout ^BANANA=$
1515
stdout '^GOPATH=\$WORK[/\\]\.gopath'$
16-
[!go1.13] stdout ^GOPROXY=$
17-
[go1.13] stdout ^GOPROXY=https://proxy.golang.org,direct$
16+
stdout ^GOPROXY=https://proxy.golang.org,direct$
1817
! stderr .+
1918

2019
env BANANA=banana
@@ -26,8 +25,7 @@ env GOPROXY=
2625
testscript -v noproxy.txt
2726
stdout ^BANANA=$
2827
stdout '^GOPATH=\$WORK[/\\]\.gopath'$
29-
[!go1.13] stdout ^GOPROXY=$
30-
[go1.13] stdout ^GOPROXY=https://proxy.golang.org,direct$
28+
stdout ^GOPROXY=https://proxy.golang.org,direct$
3129
! stderr .+
3230

3331
# no GOPROXY, no pass-through, with proxy

fmtsort/mapelem.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build go1.12
2-
// +build go1.12
3-
41
package fmtsort
52

63
import "reflect"

fmtsort/mapelem_1.11.go

Lines changed: 0 additions & 24 deletions
This file was deleted.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/rogpeppe/go-internal
22

3-
go 1.18
3+
go 1.19

goproxytest/testdata/list.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# prior to go 1.12 you cannot list a module without a requirement
2-
[!go1.12] go get fruit.com
3-
41
go list -m -versions fruit.com
52
stdout 'v1.0.0 v1.1.0'
63

testscript/exe_go118.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build go1.18
2-
// +build go1.18
3-
41
package testscript
52

63
import (

testscript/exe_pre_go1.18.go

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)