Skip to content

Commit

Permalink
Rename package cap to ocap, to avoid colliding with builtin 'cap'. (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
lthibault authored Jun 3, 2022
1 parent 94e8c50 commit a2c25e5
Show file tree
Hide file tree
Showing 26 changed files with 25 additions and 23 deletions.
6 changes: 3 additions & 3 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"capnproto.org/go/capnp/v3/rpc"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/wetware/ww/pkg/cap/anchor"
"github.com/wetware/ww/pkg/cap/cluster"
"github.com/wetware/ww/pkg/cap/pubsub"
"github.com/wetware/ww/pkg/ocap/anchor"
"github.com/wetware/ww/pkg/ocap/cluster"
"github.com/wetware/ww/pkg/ocap/pubsub"
"github.com/wetware/ww/pkg/vat"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/client/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/libp2p/go-libp2p-core/peer"

"github.com/wetware/casm/pkg/boot"
"github.com/wetware/ww/pkg/cap/cluster"
"github.com/wetware/ww/pkg/cap/pubsub"
"github.com/wetware/ww/pkg/ocap/cluster"
"github.com/wetware/ww/pkg/ocap/pubsub"
"github.com/wetware/ww/pkg/vat"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/client/dialer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/wetware/casm/pkg/boot"
clapi "github.com/wetware/ww/internal/api/cluster"
psapi "github.com/wetware/ww/internal/api/pubsub"
"github.com/wetware/ww/pkg/cap/cluster"
"github.com/wetware/ww/pkg/cap/pubsub"
"github.com/wetware/ww/pkg/client"
"github.com/wetware/ww/pkg/ocap/cluster"
"github.com/wetware/ww/pkg/ocap/pubsub"
"github.com/wetware/ww/pkg/vat"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/client/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"capnproto.org/go/capnp/v3/rpc"
"github.com/libp2p/go-libp2p-core/peer"
ma "github.com/multiformats/go-multiaddr"
"github.com/wetware/ww/pkg/cap/anchor"
"github.com/wetware/ww/pkg/cap/cluster"
"github.com/wetware/ww/pkg/ocap/anchor"
"github.com/wetware/ww/pkg/ocap/cluster"
"github.com/wetware/ww/pkg/vat"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/client/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"capnproto.org/go/capnp/v3"
"github.com/wetware/ww/pkg/cap/pubsub"
"github.com/wetware/ww/pkg/ocap/pubsub"
)

type Topic struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/stretchr/testify/require"
chan_api "github.com/wetware/ww/internal/api/channel"
api "github.com/wetware/ww/internal/api/pubsub"
"github.com/wetware/ww/pkg/cap/channel"
"github.com/wetware/ww/pkg/client"
"github.com/wetware/ww/pkg/ocap/channel"
)

func TestSubscription_refcount(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/wetware/ww/pkg/cap/anchor"
"github.com/wetware/ww/pkg/ocap/anchor"
)

func TestPath(t *testing.T) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/cap/anchor/stm_test.go → pkg/ocap/anchor/stm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/wetware/ww/pkg/cap/anchor"
"github.com/wetware/ww/pkg/ocap/anchor"
)

func TestNewScheduler(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/cap/cluster/host.go → pkg/ocap/cluster/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"capnproto.org/go/capnp/v3/server"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/wetware/ww/internal/api/cluster"
"github.com/wetware/ww/pkg/cap/anchor"
"github.com/wetware/ww/pkg/ocap/anchor"
"github.com/wetware/ww/pkg/vat"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/wetware/ww/pkg/cap/anchor"
"github.com/wetware/ww/pkg/cap/cluster"
"github.com/wetware/ww/pkg/ocap/anchor"
"github.com/wetware/ww/pkg/ocap/cluster"
)

func TestLs(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cap/cluster/view.go → pkg/ocap/cluster/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/wetware/casm/pkg/cluster/routing"
chan_api "github.com/wetware/ww/internal/api/channel"
api "github.com/wetware/ww/internal/api/cluster"
"github.com/wetware/ww/pkg/cap/channel"
"github.com/wetware/ww/pkg/ocap/channel"
"github.com/wetware/ww/pkg/vat"
"golang.org/x/sync/semaphore"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/wetware/casm/pkg/cluster/routing"
"github.com/wetware/ww/pkg/cap/cluster"
"github.com/wetware/ww/pkg/ocap/cluster"
)

func TestRecord(t *testing.T) {
Expand Down
2 changes: 2 additions & 0 deletions pkg/ocap/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package ocap contains implementations for the object capabilities defined in api/
package ocap
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/cap/pubsub/server.go → pkg/ocap/pubsub/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/lthibault/log"
ctxutil "github.com/lthibault/util/ctx"
api "github.com/wetware/ww/internal/api/pubsub"
"github.com/wetware/ww/pkg/cap/channel"
"github.com/wetware/ww/pkg/ocap/channel"
"golang.org/x/sync/errgroup"
"golang.org/x/sync/semaphore"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

pscap "github.com/wetware/ww/pkg/cap/pubsub"
pscap "github.com/wetware/ww/pkg/ocap/pubsub"
)

func TestPubSub_refcount(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
chan_api "github.com/wetware/ww/internal/api/channel"
api "github.com/wetware/ww/internal/api/pubsub"
"github.com/wetware/ww/pkg/cap/channel"
"github.com/wetware/ww/pkg/ocap/channel"
)

func TestSubscription_refcount(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/joiner.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/wetware/casm/pkg/cluster"
"github.com/wetware/ww/pkg/vat"

cluster_cap "github.com/wetware/ww/pkg/cap/cluster"
pubsub_cap "github.com/wetware/ww/pkg/cap/pubsub"
cluster_cap "github.com/wetware/ww/pkg/ocap/cluster"
pubsub_cap "github.com/wetware/ww/pkg/ocap/pubsub"
)

type PubSub interface {
Expand Down

0 comments on commit a2c25e5

Please sign in to comment.