diff --git a/cmd/check/root.go b/cmd/check/root.go index 191a87564..66708d6b3 100644 --- a/cmd/check/root.go +++ b/cmd/check/root.go @@ -26,7 +26,7 @@ func (o *checkOutput) String() string { const FlagMaxDepth = "max-depth" -func newCheckCmd() *cobra.Command { +func NewCheckCmd() *cobra.Command { cmd := &cobra.Command{ Use: "check ", Short: "Check whether a subject has a relation on an object", @@ -78,7 +78,7 @@ func newCheckCmd() *cobra.Command { } func RegisterCommandsRecursive(parent *cobra.Command) { - parent.AddCommand(newCheckCmd()) + parent.AddCommand(NewCheckCmd()) } func parseSubject(s string) (*rts.Subject, error) { diff --git a/cmd/check/root_test.go b/cmd/check/root_test.go index 1f428ac99..814b7c897 100644 --- a/cmd/check/root_test.go +++ b/cmd/check/root_test.go @@ -15,7 +15,7 @@ import ( func TestCheckCommand(t *testing.T) { nspace := &namespace.Namespace{Name: t.Name()} - ts := client.NewTestServer(t, client.ReadServer, []*namespace.Namespace{nspace}, newCheckCmd) + ts := client.NewTestServer(t, client.ReadServer, []*namespace.Namespace{nspace}, NewCheckCmd) defer ts.Shutdown(t) stdOut := ts.Cmd.ExecNoErr(t, "subject", "access", nspace.Name, "object",