Skip to content

Commit e0e6216

Browse files
committed
feat(go)!: use wrpc.io module URL
Signed-off-by: Roman Volosatovs <[email protected]>
1 parent a729dab commit e0e6216

File tree

37 files changed

+91
-93
lines changed

37 files changed

+91
-93
lines changed

crates/wit-bindgen-go/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,8 @@ impl Deps {
115115
}
116116

117117
fn wrpc(&mut self) -> &'static str {
118-
self.map.insert(
119-
"wrpc".to_string(),
120-
"github.com/bytecodealliance/wrpc/go".to_string(),
121-
);
118+
self.map
119+
.insert("wrpc".to_string(), "wrpc.io/go".to_string());
122120
"wrpc"
123121
}
124122

crates/wit-bindgen-go/tests/codegen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ use .",
4949
5050
go 1.22.2
5151
52-
require github.com/bytecodealliance/wrpc/go v0.0.0-unpublished
52+
require wrpc.io/go v0.0.0-unpublished
5353
54-
replace github.com/bytecodealliance/wrpc/go v0.0.0-unpublished => {}",
54+
replace wrpc.io/go v0.0.0-unpublished => {}",
5555
root.join("go").display(),
5656
),
5757
)

examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources/bindings.wrpc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
binary "encoding/binary"
88
errors "errors"
99
fmt "fmt"
10-
wrpc "github.com/bytecodealliance/wrpc/go"
1110
io "io"
1211
slog "log/slog"
1312
math "math"
1413
utf8 "unicode/utf8"
14+
wrpc "wrpc.io/go"
1515
)
1616

1717
type Foo interface{}

examples/go/complex-server/bindings/server.wrpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
package server
44

55
import (
6-
exports__wrpc_examples__complex__resources "github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources"
7-
wrpc "github.com/bytecodealliance/wrpc/go"
6+
exports__wrpc_examples__complex__resources "wrpc.io/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources"
7+
wrpc "wrpc.io/go"
88
)
99

1010
func Serve(s wrpc.Server, h0 exports__wrpc_examples__complex__resources.Handler) (stop func() error, err error) {

examples/go/complex-server/cmd/complex-server-nats/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"sync"
1111
"syscall"
1212

13-
server "github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings"
14-
"github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources"
15-
wrpc "github.com/bytecodealliance/wrpc/go"
16-
wrpcnats "github.com/bytecodealliance/wrpc/go/nats"
13+
server "wrpc.io/examples/go/complex-server/bindings"
14+
"wrpc.io/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources"
15+
wrpc "wrpc.io/go"
16+
wrpcnats "wrpc.io/go/nats"
1717
"github.com/google/uuid"
1818
"github.com/nats-io/nats.go"
1919
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings wit
1+
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package wrpc.io/examples/go/complex-server/bindings wit
22

33
package complex_server

examples/go/complex-server/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
module github.com/bytecodealliance/wrpc/examples/go/complex-server
1+
module wrpc.io/examples/go/complex-server
22

33
go 1.22.2
44

55
require (
6-
github.com/bytecodealliance/wrpc/go v0.0.1
76
github.com/google/uuid v1.6.0
87
github.com/nats-io/nats.go v1.37.0
8+
wrpc.io/go v0.0.2
99
)
1010

1111
require (
@@ -16,4 +16,4 @@ require (
1616
golang.org/x/sys v0.20.0 // indirect
1717
)
1818

19-
replace github.com/bytecodealliance/wrpc/go v0.0.1 => ../../../go
19+
replace wrpc.io/go v0.0.2 => ../../../go

examples/go/hello-client/bindings/wrpc_examples/hello/handler/bindings.wrpc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import (
55
context "context"
66
errors "errors"
77
fmt "fmt"
8-
wrpc "github.com/bytecodealliance/wrpc/go"
98
io "io"
109
slog "log/slog"
1110
utf8 "unicode/utf8"
11+
wrpc "wrpc.io/go"
1212
)
1313

1414
func Hello(ctx__ context.Context, wrpc__ wrpc.Invoker) (r0__ string, err__ error) {

examples/go/hello-client/cmd/hello-client-nats/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"log/slog"
88
"os"
99

10-
"github.com/bytecodealliance/wrpc/examples/go/hello-client/bindings/wrpc_examples/hello/handler"
11-
wrpcnats "github.com/bytecodealliance/wrpc/go/nats"
10+
"wrpc.io/examples/go/hello-client/bindings/wrpc_examples/hello/handler"
11+
wrpcnats "wrpc.io/go/nats"
1212
"github.com/nats-io/nats.go"
1313
)
1414

examples/go/hello-client/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
module github.com/bytecodealliance/wrpc/examples/go/hello-client
1+
module wrpc.io/examples/go/hello-client
22

33
go 1.22.2
44

55
require (
6-
github.com/bytecodealliance/wrpc/go v0.0.1
76
github.com/nats-io/nats.go v1.37.0
7+
wrpc.io/go v0.0.2
88
)
99

1010
require (
@@ -15,4 +15,4 @@ require (
1515
golang.org/x/sys v0.20.0 // indirect
1616
)
1717

18-
replace github.com/bytecodealliance/wrpc/go v0.0.1 => ../../../go
18+
replace wrpc.io/go v0.0.2 => ../../../go

0 commit comments

Comments
 (0)