diff --git a/cmd/relationtuple/create.go b/cmd/relationtuple/create.go index 6cb0c8851..72a9a17ad 100644 --- a/cmd/relationtuple/create.go +++ b/cmd/relationtuple/create.go @@ -16,7 +16,7 @@ import ( "github.com/ory/x/cmdx" ) -func newCreateCmd() *cobra.Command { +func NewCreateCmd() *cobra.Command { cmd := &cobra.Command{ Use: "create []", Short: "Create relation tuples from JSON files", diff --git a/cmd/relationtuple/delete_all.go b/cmd/relationtuple/delete_all.go index 5d5c4a1e3..512b791e1 100644 --- a/cmd/relationtuple/delete_all.go +++ b/cmd/relationtuple/delete_all.go @@ -20,7 +20,7 @@ const ( FlagForce = "force" ) -func newDeleteAllCmd() *cobra.Command { +func NewDeleteAllCmd() *cobra.Command { cmd := &cobra.Command{ Use: "delete-all", Short: "Delete ALL relation tuples matching the relation query.", diff --git a/cmd/relationtuple/delete_all_test.go b/cmd/relationtuple/delete_all_test.go index a5443525c..e5cae7c9c 100644 --- a/cmd/relationtuple/delete_all_test.go +++ b/cmd/relationtuple/delete_all_test.go @@ -14,7 +14,7 @@ func TestDeleteAllCmd(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) defer cancel() - cmd := newDeleteAllCmd() + cmd := NewDeleteAllCmd() // we will get an error here because there is no server running, but we really only care about the execution path stdout, _, _ := cmdx.ExecCtx(ctx, cmd, nil, "--insecure-skip-hostname-verification=true") assert.Contains(t, stdout, "WARNING: This operation is not reversible.") diff --git a/cmd/relationtuple/get.go b/cmd/relationtuple/get.go index 7d2535d9f..31b0845c8 100644 --- a/cmd/relationtuple/get.go +++ b/cmd/relationtuple/get.go @@ -69,7 +69,7 @@ func readQueryFromFlags(cmd *cobra.Command) (*rts.RelationQuery, error) { return query.ToProto(), nil } -func newGetCmd() *cobra.Command { +func NewGetCmd() *cobra.Command { var ( pageSize int32 pageToken string diff --git a/cmd/relationtuple/root.go b/cmd/relationtuple/root.go index 79438cdda..74c6f7dd1 100644 --- a/cmd/relationtuple/root.go +++ b/cmd/relationtuple/root.go @@ -21,7 +21,7 @@ func RegisterCommandsRecursive(parent *cobra.Command) { parent.AddCommand(relationCmd) - relationCmd.AddCommand(newGetCmd(), newCreateCmd(), newDeleteCmd(), newDeleteAllCmd(), newParseCmd()) + relationCmd.AddCommand(NewGetCmd(), NewCreateCmd(), newDeleteCmd(), NewDeleteAllCmd(), newParseCmd()) } func registerPackageFlags(flags *pflag.FlagSet) {