Skip to content

Commit

Permalink
chore: bump Go to 1.23.3 (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreya authored Nov 26, 2024
1 parent 195a37a commit 7e87bc0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:
# Install Go!
- uses: actions/setup-go@v3
with:
go-version: "~1.22"
go-version: "~1.23"

# Check for Go linting errors!
- name: Lint Go
uses: golangci/golangci-lint-action@v6.0.1
uses: golangci/golangci-lint-action@v6.1.1
with:
version: v1.59.1
version: v1.62.2
args: "--out-${NO_FUTURE}format colored-line-number"

- name: Lint shell scripts
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "~1.22"
go-version: "~1.23"

# Sadly the new "set output" syntax (of writing env vars to
# $GITHUB_OUTPUT) does not work on both powershell and bash so we use the
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "~1.22"
go-version: "~1.23"

# Sadly the new "set output" syntax (of writing env vars to
# $GITHUB_OUTPUT) does not work on both powershell and bash so we use the
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "~1.22"
go-version: "~1.23"

- name: Go Cache Paths
id: go-cache-paths
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "~1.22"
go-version: "~1.23"

- name: Go Cache Paths
id: go-cache-paths
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "~1.22"
go-version: "~1.23"

- name: build image
run: make -j build/image/envbox
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "~1.22"
go-version: "~1.23"

- name: Go Cache Paths
id: go-cache-paths
Expand Down
8 changes: 8 additions & 0 deletions cli/cliflag/cliflag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ func TestCliflag(t *testing.T) {
flagset, name, shorthand, env, usage := randomFlag()
def, _ := cryptorand.Intn(10)

//nolint:gosec
cliflag.Uint8VarP(flagset, &ptr, name, shorthand, env, uint8(def), usage)
got, err := flagset.GetUint8(name)
require.NoError(t, err)
//nolint:gosec
require.Equal(t, uint8(def), got)
require.Contains(t, flagset.FlagUsages(), usage)
require.Contains(t, flagset.FlagUsages(), fmt.Sprintf("Consumes $%s", env))
Expand All @@ -125,12 +127,15 @@ func TestCliflag(t *testing.T) {
var ptr uint8
flagset, name, shorthand, env, usage := randomFlag()
envValue, _ := cryptorand.Intn(10)
//nolint:gosec
t.Setenv(env, strconv.FormatUint(uint64(envValue), 10))
def, _ := cryptorand.Intn(10)

//nolint:gosec
cliflag.Uint8VarP(flagset, &ptr, name, shorthand, env, uint8(def), usage)
got, err := flagset.GetUint8(name)
require.NoError(t, err)
//nolint:gosec
require.Equal(t, uint8(envValue), got)
})

Expand All @@ -141,9 +146,11 @@ func TestCliflag(t *testing.T) {
t.Setenv(env, envValue)
def, _ := cryptorand.Intn(10)

//nolint:gosec
cliflag.Uint8VarP(flagset, &ptr, name, shorthand, env, uint8(def), usage)
got, err := flagset.GetUint8(name)
require.NoError(t, err)
//nolint:gosec
require.Equal(t, uint8(def), got)
})

Expand All @@ -164,6 +171,7 @@ func TestCliflag(t *testing.T) {
var ptr int
flagset, name, shorthand, env, usage := randomFlag()
envValue, _ := cryptorand.Intn(10)
//nolint:gosec
t.Setenv(env, strconv.FormatUint(uint64(envValue), 10))
def, _ := cryptorand.Intn(10)

Expand Down
1 change: 1 addition & 0 deletions dockerutil/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func mustNextIPv4(ip net.IP, inc int) net.IP {
v += uint32(ip4[1]) << 16
v += uint32(ip4[2]) << 8
v += uint32(ip4[3])
//nolint:gosec
v += uint32(inc)
v3 := byte(v & 0xFF)
v2 := byte((v >> 8) & 0xFF)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/coder/envbox

go 1.22.4
go 1.23.3

// There are a few minor changes we make to Tailscale that we're slowly upstreaming. Compare here:
// https://github.com/tailscale/tailscale/compare/main...coder:tailscale:main
Expand Down
1 change: 1 addition & 0 deletions xunix/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func createDevice(ctx context.Context, conf deviceConfig) error {
return xerrors.Errorf("ensure parent dir: %w", err)
}

//nolint:gosec
err = fs.Mknod(conf.path, conf.ftype|conf.mode, int(conf.dev))
if err != nil {
return xerrors.Errorf("mknod %s c %d %d: %w", conf.path, conf.major, conf.minor, err)
Expand Down

0 comments on commit 7e87bc0

Please sign in to comment.