Skip to content

chore: Update to Go 1.24 #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 12, 2025
Merged
9 changes: 3 additions & 6 deletions .github/workflows/component-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:
- 'examples/component/**'

env:
TINYGO_VERSION: "0.33.0"
GOLANGCI_VERSION: "v1.61"
TINYGO_VERSION: "0.36.0"
GOLANGCI_VERSION: "v1.64.2"
WASH_VERSION: "0.37.0"
WASM_TOOLS_VERSION: "1.220.0"

Expand Down Expand Up @@ -88,9 +88,6 @@ jobs:
- http-password-checker
- invoke
- sqldb-postgres-query
tinygo-version:
- "0.33.0"
- "0.34.0"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -99,7 +96,7 @@ jobs:
go-version-file: "./examples/component/${{ matrix.example }}/go.mod"
- uses: acifani/setup-tinygo@b2ba42b249c7d3efdfe94166ec0f48b3191404f7 # v2.0.0
with:
tinygo-version: ${{ matrix.tinygo-version }}
tinygo-version: ${{ env.TINYGO_VERSION }}
- uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
with:
version: ${{ env.GOLANGCI_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/templates-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- "templates/**"

env:
TINYGO_VERSION: "0.34.0"
TINYGO_VERSION: "0.36.0"
GOLANGCI_VERSION: "v1.61"
WASH_VERSION: "0.37.0"
WASM_TOOLS_VERSION: "1.220.0"
Expand Down
4 changes: 3 additions & 1 deletion component/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ run:
modules-download-mode: readonly

output:
uniq-by-line: false
show-stats: true
sort-results: true
sort-order:
- linter
- severity
- file

issues:
uniq-by-line: false

linters:
enable:
- gofmt
Expand Down
4 changes: 3 additions & 1 deletion component/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.wasmcloud.dev/component

go 1.23.0
go 1.24

require (
github.com/samber/slog-common v0.18.1
Expand All @@ -22,3 +22,5 @@ require (
golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
)

tool go.bytecodealliance.org/cmd/wit-bindgen-go
2 changes: 1 addition & 1 deletion component/sdk.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package component

//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world sdk --out gen ./wit
//go:generate go tool wit-bindgen-go generate --world sdk --out gen ./wit

import (
"embed"
Expand Down
7 changes: 0 additions & 7 deletions component/tools.go

This file was deleted.

4 changes: 3 additions & 1 deletion examples/component/http-client/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/wasmCloud/go/examples/component/http-client

go 1.23.0
go 1.24

require (
go.bytecodealliance.org v0.5.0
Expand All @@ -21,5 +21,7 @@ require (
golang.org/x/sys v0.29.0 // indirect
)

tool go.bytecodealliance.org/cmd/wit-bindgen-go

// NOTE(lxf): Remove this line if running outside of wasmCloud/go repository
replace go.wasmcloud.dev/component => ../../../component
2 changes: 1 addition & 1 deletion examples/component/http-client/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world example --out gen ./wit
//go:generate go tool wit-bindgen-go generate --world example --out gen ./wit

import (
"io"
Expand Down
7 changes: 0 additions & 7 deletions examples/component/http-client/tools.go

This file was deleted.

7 changes: 6 additions & 1 deletion examples/component/http-keyvalue-crud/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/wasmCloud/go/examples/component/http-keyvalue-crud

go 1.23.0
go 1.24

require (
github.com/julienschmidt/httprouter v1.3.0
Expand All @@ -25,3 +25,8 @@ require (
golang.org/x/sys v0.29.0 // indirect
golang.org/x/tools v0.28.0 // indirect
)

tool (
go.bytecodealliance.org/cmd/wit-bindgen-go
go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
)
2 changes: 1 addition & 1 deletion examples/component/http-keyvalue-crud/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world component --out gen ./wit
//go:generate go tool wit-bindgen-go generate --world component --out gen ./wit
package main

import (
Expand Down
4 changes: 2 additions & 2 deletions examples/component/http-keyvalue-crud/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
//go:generate go tool wadge-bindgen-go

package main

Expand Down Expand Up @@ -47,7 +47,7 @@ func TestIncomingHandler(t *testing.T) {
}
defer resp.Body.Close()

if want, got := []byte("Hello from Go!\n"), buf; !bytes.Equal(want, got) {
if want, got := []byte("{\"message\":\"GET, POST, or DELETE to /crud/<key> (with JSON payload for POSTs)\"}\n"), buf; !bytes.Equal(want, got) {
t.Fatalf("unexpected response body: want %q, got %q", want, got)
}
})
Expand Down
8 changes: 0 additions & 8 deletions examples/component/http-keyvalue-crud/tools.go

This file was deleted.

7 changes: 6 additions & 1 deletion examples/component/http-password-checker/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module http-password-checker

go 1.23.0
go 1.24

require (
github.com/stretchr/testify v1.10.0
Expand Down Expand Up @@ -29,3 +29,8 @@ require (
golang.org/x/tools v0.29.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

tool (
go.bytecodealliance.org/cmd/wit-bindgen-go
go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
)
2 changes: 1 addition & 1 deletion examples/component/http-password-checker/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world hello --out gen ./wit
//go:generate go tool wit-bindgen-go generate --world hello --out gen ./wit
package main

import (
Expand Down
2 changes: 1 addition & 1 deletion examples/component/http-password-checker/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go -test
//go:generate go tool wadge-bindgen-go -test

package main

Expand Down
8 changes: 0 additions & 8 deletions examples/component/http-password-checker/tools.go

This file was deleted.

7 changes: 6 additions & 1 deletion examples/component/http-server/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/wasmCloud/go/examples/component/http-server

go 1.23.0
go 1.24

require (
github.com/stretchr/testify v1.10.0
Expand Down Expand Up @@ -35,3 +35,8 @@ require (

// NOTE(lxf): Remove this line if running outside of wasmCloud/go repository
replace go.wasmcloud.dev/component => ../../../component

tool (
go.bytecodealliance.org/cmd/wit-bindgen-go
go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
)
2 changes: 1 addition & 1 deletion examples/component/http-server/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world example --out gen ./wit
//go:generate go tool wit-bindgen-go generate --world example --out gen ./wit

package main

Expand Down
2 changes: 1 addition & 1 deletion examples/component/http-server/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go -test
//go:generate go tool wadge-bindgen-go -test

package main

Expand Down
8 changes: 0 additions & 8 deletions examples/component/http-server/tools.go

This file was deleted.

7 changes: 6 additions & 1 deletion examples/component/invoke/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/wasmCloud/go/examples/component/invoke

go 1.23.0
go 1.24

require (
github.com/stretchr/testify v1.10.0
Expand Down Expand Up @@ -33,3 +33,8 @@ require (

// NOTE(lxf): Remove this line if running outside of wasmCloud/go repository
replace go.wasmcloud.dev/component => ../../../component

tool (
go.bytecodealliance.org/cmd/wit-bindgen-go
go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
)
2 changes: 1 addition & 1 deletion examples/component/invoke/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world example --out gen ./wit
//go:generate go tool wit-bindgen-go generate --world example --out gen ./wit

package main

Expand Down
2 changes: 1 addition & 1 deletion examples/component/invoke/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go -test
//go:generate go tool wadge-bindgen-go -test

package main

Expand Down
8 changes: 0 additions & 8 deletions examples/component/invoke/tools.go

This file was deleted.

4 changes: 3 additions & 1 deletion examples/component/wasitel-http/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module wasitel-http

go 1.23.2
go 1.24

require (
go.bytecodealliance.org v0.5.0
Expand Down Expand Up @@ -32,3 +32,5 @@ require (
golang.org/x/mod v0.22.0 // indirect
golang.org/x/sys v0.29.0 // indirect
)

tool go.bytecodealliance.org/cmd/wit-bindgen-go
2 changes: 1 addition & 1 deletion examples/component/wasitel-http/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world example --out gen ./wit
//go:generate go tool wit-bindgen-go generate --world example --out gen ./wit

package main

Expand Down
7 changes: 0 additions & 7 deletions examples/component/wasitel-http/tools.go

This file was deleted.

Loading