Skip to content
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

feat(go)!: use wrpc.io module URL #269

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions crates/wit-bindgen-go/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,8 @@ impl Deps {
}

fn wrpc(&mut self) -> &'static str {
self.map.insert(
"wrpc".to_string(),
"github.com/bytecodealliance/wrpc/go".to_string(),
);
self.map
.insert("wrpc".to_string(), "wrpc.io/go".to_string());
"wrpc"
}

Expand Down
4 changes: 2 additions & 2 deletions crates/wit-bindgen-go/tests/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ use .",
go 1.22.2
require github.com/bytecodealliance/wrpc/go v0.0.0-unpublished
require wrpc.io/go v0.0.0-unpublished
replace github.com/bytecodealliance/wrpc/go v0.0.0-unpublished => {}",
replace wrpc.io/go v0.0.0-unpublished => {}",
root.join("go").display(),
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
binary "encoding/binary"
errors "errors"
fmt "fmt"
wrpc "github.com/bytecodealliance/wrpc/go"
io "io"
slog "log/slog"
math "math"
utf8 "unicode/utf8"
wrpc "wrpc.io/go"
)

type Foo interface{}
Expand Down
4 changes: 2 additions & 2 deletions examples/go/complex-server/bindings/server.wrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package server

import (
exports__wrpc_examples__complex__resources "github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources"
wrpc "github.com/bytecodealliance/wrpc/go"
exports__wrpc_examples__complex__resources "wrpc.io/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources"
wrpc "wrpc.io/go"
)

func Serve(s wrpc.Server, h0 exports__wrpc_examples__complex__resources.Handler) (stop func() error, err error) {
Expand Down
8 changes: 4 additions & 4 deletions examples/go/complex-server/cmd/complex-server-nats/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"sync"
"syscall"

server "github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings"
"github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources"
wrpc "github.com/bytecodealliance/wrpc/go"
wrpcnats "github.com/bytecodealliance/wrpc/go/nats"
server "wrpc.io/examples/go/complex-server/bindings"
"wrpc.io/examples/go/complex-server/bindings/exports/wrpc_examples/complex/resources"
wrpc "wrpc.io/go"
wrpcnats "wrpc.io/go/nats"
"github.com/google/uuid"
"github.com/nats-io/nats.go"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/go/complex-server/complex_server.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/bytecodealliance/wrpc/examples/go/complex-server/bindings wit
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package wrpc.io/examples/go/complex-server/bindings wit

package complex_server
6 changes: 3 additions & 3 deletions examples/go/complex-server/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/bytecodealliance/wrpc/examples/go/complex-server
module wrpc.io/examples/go/complex-server

go 1.22.2

require (
github.com/bytecodealliance/wrpc/go v0.0.1
github.com/google/uuid v1.6.0
github.com/nats-io/nats.go v1.37.0
wrpc.io/go v0.0.2
)

require (
Expand All @@ -16,4 +16,4 @@ require (
golang.org/x/sys v0.20.0 // indirect
)

replace github.com/bytecodealliance/wrpc/go v0.0.1 => ../../../go
replace wrpc.io/go v0.0.2 => ../../../go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
context "context"
errors "errors"
fmt "fmt"
wrpc "github.com/bytecodealliance/wrpc/go"
io "io"
slog "log/slog"
utf8 "unicode/utf8"
wrpc "wrpc.io/go"
)

func Hello(ctx__ context.Context, wrpc__ wrpc.Invoker) (r0__ string, err__ error) {
Expand Down
4 changes: 2 additions & 2 deletions examples/go/hello-client/cmd/hello-client-nats/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"log/slog"
"os"

"github.com/bytecodealliance/wrpc/examples/go/hello-client/bindings/wrpc_examples/hello/handler"
wrpcnats "github.com/bytecodealliance/wrpc/go/nats"
"wrpc.io/examples/go/hello-client/bindings/wrpc_examples/hello/handler"
wrpcnats "wrpc.io/go/nats"
"github.com/nats-io/nats.go"
)

Expand Down
6 changes: 3 additions & 3 deletions examples/go/hello-client/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/bytecodealliance/wrpc/examples/go/hello-client
module wrpc.io/examples/go/hello-client

go 1.22.2

require (
github.com/bytecodealliance/wrpc/go v0.0.1
github.com/nats-io/nats.go v1.37.0
wrpc.io/go v0.0.2
)

require (
Expand All @@ -15,4 +15,4 @@ require (
golang.org/x/sys v0.20.0 // indirect
)

replace github.com/bytecodealliance/wrpc/go v0.0.1 => ../../../go
replace wrpc.io/go v0.0.2 => ../../../go
2 changes: 1 addition & 1 deletion examples/go/hello-client/hello_client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/bytecodealliance/wrpc/examples/go/hello-client/bindings wit
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package wrpc.io/examples/go/hello-client/bindings wit

package hello_client
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
context "context"
binary "encoding/binary"
fmt "fmt"
wrpc "github.com/bytecodealliance/wrpc/go"
io "io"
slog "log/slog"
math "math"
wrpc "wrpc.io/go"
)

type Handler interface {
Expand Down
4 changes: 2 additions & 2 deletions examples/go/hello-server/bindings/server.wrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package server

import (
exports__wrpc_examples__hello__handler "github.com/bytecodealliance/wrpc/examples/go/hello-server/bindings/exports/wrpc_examples/hello/handler"
wrpc "github.com/bytecodealliance/wrpc/go"
exports__wrpc_examples__hello__handler "wrpc.io/examples/go/hello-server/bindings/exports/wrpc_examples/hello/handler"
wrpc "wrpc.io/go"
)

func Serve(s wrpc.Server, h0 exports__wrpc_examples__hello__handler.Handler) (stop func() error, err error) {
Expand Down
4 changes: 2 additions & 2 deletions examples/go/hello-server/cmd/hello-server-nats/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"os/signal"
"syscall"

server "github.com/bytecodealliance/wrpc/examples/go/hello-server/bindings"
wrpcnats "github.com/bytecodealliance/wrpc/go/nats"
server "wrpc.io/examples/go/hello-server/bindings"
wrpcnats "wrpc.io/go/nats"
"github.com/nats-io/nats.go"
)

Expand Down
6 changes: 3 additions & 3 deletions examples/go/hello-server/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/bytecodealliance/wrpc/examples/go/hello-server
module wrpc.io/examples/go/hello-server

go 1.22.2

require (
github.com/bytecodealliance/wrpc/go v0.0.1
github.com/nats-io/nats.go v1.37.0
wrpc.io/go v0.0.2
)

require (
Expand All @@ -15,4 +15,4 @@ require (
golang.org/x/sys v0.20.0 // indirect
)

replace github.com/bytecodealliance/wrpc/go v0.0.1 => ../../../go
replace wrpc.io/go v0.0.2 => ../../../go
2 changes: 1 addition & 1 deletion examples/go/hello-server/hello_server.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/bytecodealliance/wrpc/examples/go/hello-server/bindings wit
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package wrpc.io/examples/go/hello-server/bindings wit

package hello_server
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
binary "encoding/binary"
errors "errors"
fmt "fmt"
wrpc "github.com/bytecodealliance/wrpc/go"
io "io"
slog "log/slog"
math "math"
sync "sync"
atomic "sync/atomic"
wrpc "wrpc.io/go"
)

type Req struct {
Expand Down
4 changes: 2 additions & 2 deletions examples/go/streams-client/cmd/streams-client-nats/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"sync"
"time"

"github.com/bytecodealliance/wrpc/examples/go/streams-client/bindings/wrpc_examples/streams/handler"
wrpcnats "github.com/bytecodealliance/wrpc/go/nats"
"wrpc.io/examples/go/streams-client/bindings/wrpc_examples/streams/handler"
wrpcnats "wrpc.io/go/nats"
"github.com/nats-io/nats.go"
)

Expand Down
6 changes: 3 additions & 3 deletions examples/go/streams-client/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/bytecodealliance/wrpc/examples/go/streams-client
module wrpc.io/examples/go/streams-client

go 1.22.2

require (
github.com/bytecodealliance/wrpc/go v0.0.1
github.com/nats-io/nats.go v1.37.0
wrpc.io/go v0.0.2
)

require (
Expand All @@ -15,4 +15,4 @@ require (
golang.org/x/sys v0.20.0 // indirect
)

replace github.com/bytecodealliance/wrpc/go v0.0.1 => ../../../go
replace wrpc.io/go v0.0.2 => ../../../go
2 changes: 1 addition & 1 deletion examples/go/streams-client/streams_client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/bytecodealliance/wrpc/examples/go/streams-client/bindings wit
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package wrpc.io/examples/go/streams-client/bindings wit

package streams_client
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
binary "encoding/binary"
errors "errors"
fmt "fmt"
wrpc "github.com/bytecodealliance/wrpc/go"
io "io"
slog "log/slog"
math "math"
sync "sync"
atomic "sync/atomic"
wrpc "wrpc.io/go"
)

type Req struct {
Expand Down
4 changes: 2 additions & 2 deletions examples/go/streams-server/bindings/server.wrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package server

import (
exports__wrpc_examples__streams__handler "github.com/bytecodealliance/wrpc/examples/go/streams-server/bindings/exports/wrpc_examples/streams/handler"
wrpc "github.com/bytecodealliance/wrpc/go"
exports__wrpc_examples__streams__handler "wrpc.io/examples/go/streams-server/bindings/exports/wrpc_examples/streams/handler"
wrpc "wrpc.io/go"
)

func Serve(s wrpc.Server, h0 exports__wrpc_examples__streams__handler.Handler) (stop func() error, err error) {
Expand Down
8 changes: 4 additions & 4 deletions examples/go/streams-server/cmd/streams-server-nats/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"os/signal"
"syscall"

server "github.com/bytecodealliance/wrpc/examples/go/streams-server/bindings"
"github.com/bytecodealliance/wrpc/examples/go/streams-server/bindings/exports/wrpc_examples/streams/handler"
wrpc "github.com/bytecodealliance/wrpc/go"
wrpcnats "github.com/bytecodealliance/wrpc/go/nats"
server "wrpc.io/examples/go/streams-server/bindings"
"wrpc.io/examples/go/streams-server/bindings/exports/wrpc_examples/streams/handler"
wrpc "wrpc.io/go"
wrpcnats "wrpc.io/go/nats"
"github.com/nats-io/nats.go"
)

Expand Down
6 changes: 3 additions & 3 deletions examples/go/streams-server/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/bytecodealliance/wrpc/examples/go/streams-server
module wrpc.io/examples/go/streams-server

go 1.22.2

require (
github.com/bytecodealliance/wrpc/go v0.0.1
github.com/nats-io/nats.go v1.37.0
wrpc.io/go v0.0.2
)

require (
Expand All @@ -15,4 +15,4 @@ require (
golang.org/x/sys v0.20.0 // indirect
)

replace github.com/bytecodealliance/wrpc/go v0.0.1 => ../../../go
replace wrpc.io/go v0.0.2 => ../../../go
2 changes: 1 addition & 1 deletion examples/go/streams-server/streams_server.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package github.com/bytecodealliance/wrpc/examples/go/streams-server/bindings wit
//go:generate cargo run --bin wit-bindgen-wrpc go --out-dir bindings --package wrpc.io/examples/go/streams-server/bindings wit

package streams_server
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ use (
./tests/go
)

replace github.com/bytecodealliance/wrpc/go v0.0.1 => ./go
replace wrpc.io/go v0.0.2 => ./go
2 changes: 1 addition & 1 deletion go/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/bytecodealliance/wrpc/go
module wrpc.io/go

go 1.22.2

Expand Down
2 changes: 1 addition & 1 deletion go/nats/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sync"
"sync/atomic"

wrpc "github.com/bytecodealliance/wrpc/go"
wrpc "wrpc.io/go"
"github.com/nats-io/nats.go"
)

Expand Down
4 changes: 2 additions & 2 deletions tests/go/async.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate $WIT_BINDGEN_WRPC go --world async-server --out-dir bindings/async_server --package github.com/bytecodealliance/wrpc/tests/go/bindings/async_server ../wit
//go:generate $WIT_BINDGEN_WRPC go --world async-server --out-dir bindings/async_server --package wrpc.io/tests/go/bindings/async_server ../wit

package integration

Expand All @@ -7,7 +7,7 @@ import (
"context"
"log/slog"

wrpc "github.com/bytecodealliance/wrpc/go"
wrpc "wrpc.io/go"
)

type AsyncHandler struct{}
Expand Down
12 changes: 6 additions & 6 deletions tests/go/async_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate $WIT_BINDGEN_WRPC go --world async-client --out-dir bindings/async_client --package github.com/bytecodealliance/wrpc/tests/go/bindings/async_client ../wit
//go:generate $WIT_BINDGEN_WRPC go --world async-client --out-dir bindings/async_client --package wrpc.io/tests/go/bindings/async_client ../wit

package integration_test

Expand All @@ -10,11 +10,11 @@ import (
"testing"
"time"

wrpcnats "github.com/bytecodealliance/wrpc/go/nats"
integration "github.com/bytecodealliance/wrpc/tests/go"
"github.com/bytecodealliance/wrpc/tests/go/bindings/async_client/wrpc_test/integration/async"
"github.com/bytecodealliance/wrpc/tests/go/bindings/async_server"
"github.com/bytecodealliance/wrpc/tests/go/internal"
wrpcnats "wrpc.io/go/nats"
integration "wrpc.io/tests/go"
"wrpc.io/tests/go/bindings/async_client/wrpc_test/integration/async"
"wrpc.io/tests/go/bindings/async_server"
"wrpc.io/tests/go/internal"
"github.com/nats-io/nats.go"
)

Expand Down
6 changes: 3 additions & 3 deletions tests/go/cmd/sync-server-nats/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"os/signal"
"syscall"

wrpcnats "github.com/bytecodealliance/wrpc/go/nats"
integration "github.com/bytecodealliance/wrpc/tests/go"
"github.com/bytecodealliance/wrpc/tests/go/bindings/sync_server"
wrpcnats "wrpc.io/go/nats"
integration "wrpc.io/tests/go"
"wrpc.io/tests/go/bindings/sync_server"
"github.com/nats-io/nats.go"
)

Expand Down
6 changes: 3 additions & 3 deletions tests/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/bytecodealliance/wrpc/tests/go
module wrpc.io/tests/go

go 1.22.2

require (
github.com/bytecodealliance/wrpc/go v0.0.1
github.com/google/uuid v1.6.0
github.com/nats-io/nats-server/v2 v2.10.14
github.com/nats-io/nats.go v1.37.0
wrpc.io/go v0.0.2
)

require (
Expand All @@ -24,4 +24,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/bytecodealliance/wrpc/go v0.0.1 => ../../go
replace wrpc.io/go v0.0.2 => ../../go
Loading
Loading