Skip to content

Instantly share code, notes, and snippets.

@refs
Created July 26, 2020 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save refs/04728f5e4d4c106380383871c5ed579c to your computer and use it in GitHub Desktop.
Save refs/04728f5e4d4c106380383871c5ed579c to your computer and use it in GitHub Desktop.
diff --git a/pkg/command/accounts.go b/pkg/command/accounts.go
index b449349..f3883eb 100644
--- a/pkg/command/accounts.go
+++ b/pkg/command/accounts.go
@@ -3,6 +3,8 @@
package command
import (
+ "fmt"
+
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-accounts/pkg/command"
svcconfig "github.com/owncloud/ocis-accounts/pkg/config"
@@ -18,6 +20,16 @@ func AccountsCommand(cfg *config.Config) *cli.Command {
Usage: "Start accounts server",
Category: "Extensions",
Flags: flagset.ServerWithConfig(cfg.Accounts),
+ Subcommands: []*cli.Command{
+ {
+ Name: "list",
+ Description: "Display a list of accounts",
+ Action: func(c *cli.Context) error {
+ fmt.Println("acocunts subcommand's subcommand!")
+ return nil
+ },
+ },
+ },
Action: func(c *cli.Context) error {
accountsCommand := command.Server(configureAccounts(cfg))
if err := accountsCommand.Before(c); err != nil {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment