Skip to content

Commit b9e75d9

Browse files
authored
Merge pull request #209 from joonas/chore/use-go_1_24-tool
chore: Update to Go 1.24
2 parents d6846f2 + 9aec23e commit b9e75d9

File tree

28 files changed

+52
-80
lines changed

28 files changed

+52
-80
lines changed

.github/workflows/component-go.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
- 'examples/component/**'
1616

1717
env:
18-
TINYGO_VERSION: "0.33.0"
19-
GOLANGCI_VERSION: "v1.61"
18+
TINYGO_VERSION: "0.36.0"
19+
GOLANGCI_VERSION: "v1.64.2"
2020
WASH_VERSION: "0.37.0"
2121
WASM_TOOLS_VERSION: "1.220.0"
2222

@@ -88,9 +88,6 @@ jobs:
8888
- http-password-checker
8989
- invoke
9090
- sqldb-postgres-query
91-
tinygo-version:
92-
- "0.33.0"
93-
- "0.34.0"
9491
runs-on: ubuntu-latest
9592
steps:
9693
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -99,7 +96,7 @@ jobs:
9996
go-version-file: "./examples/component/${{ matrix.example }}/go.mod"
10097
- uses: acifani/setup-tinygo@b2ba42b249c7d3efdfe94166ec0f48b3191404f7 # v2.0.0
10198
with:
102-
tinygo-version: ${{ matrix.tinygo-version }}
99+
tinygo-version: ${{ env.TINYGO_VERSION }}
103100
- uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
104101
with:
105102
version: ${{ env.GOLANGCI_VERSION }}

.github/workflows/templates-go.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- "templates/**"
1414

1515
env:
16-
TINYGO_VERSION: "0.34.0"
16+
TINYGO_VERSION: "0.36.0"
1717
GOLANGCI_VERSION: "v1.61"
1818
WASH_VERSION: "0.37.0"
1919
WASM_TOOLS_VERSION: "1.220.0"

component/.golangci.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ run:
33
modules-download-mode: readonly
44

55
output:
6-
uniq-by-line: false
76
show-stats: true
87
sort-results: true
98
sort-order:
109
- linter
1110
- severity
1211
- file
1312

13+
issues:
14+
uniq-by-line: false
15+
1416
linters:
1517
enable:
1618
- gofmt

component/go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module go.wasmcloud.dev/component
22

3-
go 1.23.0
3+
go 1.24
44

55
require (
66
github.com/samber/slog-common v0.18.1
@@ -22,3 +22,5 @@ require (
2222
golang.org/x/sys v0.29.0 // indirect
2323
golang.org/x/text v0.21.0 // indirect
2424
)
25+
26+
tool go.bytecodealliance.org/cmd/wit-bindgen-go

component/sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package component
22

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

55
import (
66
"embed"

component/tools.go

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

examples/component/http-client/go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/wasmCloud/go/examples/component/http-client
22

3-
go 1.23.0
3+
go 1.24
44

55
require (
66
go.bytecodealliance.org v0.5.0
@@ -21,5 +21,7 @@ require (
2121
golang.org/x/sys v0.29.0 // indirect
2222
)
2323

24+
tool go.bytecodealliance.org/cmd/wit-bindgen-go
25+
2426
// NOTE(lxf): Remove this line if running outside of wasmCloud/go repository
2527
replace go.wasmcloud.dev/component => ../../../component

examples/component/http-client/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

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

55
import (
66
"io"

examples/component/http-client/tools.go

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

examples/component/http-keyvalue-crud/go.mod

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/wasmCloud/go/examples/component/http-keyvalue-crud
22

3-
go 1.23.0
3+
go 1.24
44

55
require (
66
github.com/julienschmidt/httprouter v1.3.0
@@ -25,3 +25,8 @@ require (
2525
golang.org/x/sys v0.29.0 // indirect
2626
golang.org/x/tools v0.28.0 // indirect
2727
)
28+
29+
tool (
30+
go.bytecodealliance.org/cmd/wit-bindgen-go
31+
go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
32+
)

examples/component/http-keyvalue-crud/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world component --out gen ./wit
1+
//go:generate go tool wit-bindgen-go generate --world component --out gen ./wit
22
package main
33

44
import (

examples/component/http-keyvalue-crud/main_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
1+
//go:generate go tool wadge-bindgen-go
22

33
package main
44

@@ -47,7 +47,7 @@ func TestIncomingHandler(t *testing.T) {
4747
}
4848
defer resp.Body.Close()
4949

50-
if want, got := []byte("Hello from Go!\n"), buf; !bytes.Equal(want, got) {
50+
if want, got := []byte("{\"message\":\"GET, POST, or DELETE to /crud/<key> (with JSON payload for POSTs)\"}\n"), buf; !bytes.Equal(want, got) {
5151
t.Fatalf("unexpected response body: want %q, got %q", want, got)
5252
}
5353
})

examples/component/http-keyvalue-crud/tools.go

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

examples/component/http-password-checker/go.mod

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module http-password-checker
22

3-
go 1.23.0
3+
go 1.24
44

55
require (
66
github.com/stretchr/testify v1.10.0
@@ -29,3 +29,8 @@ require (
2929
golang.org/x/tools v0.29.0 // indirect
3030
gopkg.in/yaml.v3 v3.0.1 // indirect
3131
)
32+
33+
tool (
34+
go.bytecodealliance.org/cmd/wit-bindgen-go
35+
go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
36+
)

examples/component/http-password-checker/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world hello --out gen ./wit
1+
//go:generate go tool wit-bindgen-go generate --world hello --out gen ./wit
22
package main
33

44
import (

examples/component/http-password-checker/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go -test
1+
//go:generate go tool wadge-bindgen-go -test
22

33
package main
44

examples/component/http-password-checker/tools.go

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

examples/component/http-server/go.mod

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/wasmCloud/go/examples/component/http-server
22

3-
go 1.23.0
3+
go 1.24
44

55
require (
66
github.com/stretchr/testify v1.10.0
@@ -35,3 +35,8 @@ require (
3535

3636
// NOTE(lxf): Remove this line if running outside of wasmCloud/go repository
3737
replace go.wasmcloud.dev/component => ../../../component
38+
39+
tool (
40+
go.bytecodealliance.org/cmd/wit-bindgen-go
41+
go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
42+
)

examples/component/http-server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world example --out gen ./wit
1+
//go:generate go tool wit-bindgen-go generate --world example --out gen ./wit
22

33
package main
44

examples/component/http-server/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go -test
1+
//go:generate go tool wadge-bindgen-go -test
22

33
package main
44

examples/component/http-server/tools.go

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

examples/component/invoke/go.mod

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/wasmCloud/go/examples/component/invoke
22

3-
go 1.23.0
3+
go 1.24
44

55
require (
66
github.com/stretchr/testify v1.10.0
@@ -33,3 +33,8 @@ require (
3333

3434
// NOTE(lxf): Remove this line if running outside of wasmCloud/go repository
3535
replace go.wasmcloud.dev/component => ../../../component
36+
37+
tool (
38+
go.bytecodealliance.org/cmd/wit-bindgen-go
39+
go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go
40+
)

examples/component/invoke/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world example --out gen ./wit
1+
//go:generate go tool wit-bindgen-go generate --world example --out gen ./wit
22

33
package main
44

examples/component/invoke/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.wasmcloud.dev/wadge/cmd/wadge-bindgen-go -test
1+
//go:generate go tool wadge-bindgen-go -test
22

33
package main
44

examples/component/invoke/tools.go

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

examples/component/wasitel-http/go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module wasitel-http
22

3-
go 1.23.2
3+
go 1.24
44

55
require (
66
go.bytecodealliance.org v0.5.0
@@ -32,3 +32,5 @@ require (
3232
golang.org/x/mod v0.22.0 // indirect
3333
golang.org/x/sys v0.29.0 // indirect
3434
)
35+
36+
tool go.bytecodealliance.org/cmd/wit-bindgen-go

examples/component/wasitel-http/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run go.bytecodealliance.org/cmd/wit-bindgen-go generate --world example --out gen ./wit
1+
//go:generate go tool wit-bindgen-go generate --world example --out gen ./wit
22

33
package main
44

examples/component/wasitel-http/tools.go

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

0 commit comments

Comments
 (0)