Skip to content

Commit 5af8514

Browse files
author
Joonas Bergius
committed
chore(examples): Switch http-keyvalue-crud component example to Go 1.24
Signed-off-by: Joonas Bergius <[email protected]>
1 parent 83576ab commit 5af8514

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

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.

0 commit comments

Comments
 (0)