Remove account cmd

This commit is contained in:
Radhi Fadlillah 2019-05-23 19:24:30 +07:00
parent 368fb2b72d
commit 5fe2c32118
5 changed files with 0 additions and 67 deletions

View file

@ -1,13 +0,0 @@
package cmd
import "github.com/spf13/cobra"
func accountAddCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "add username",
Short: "Create new account",
Args: cobra.ExactArgs(1),
}
return cmd
}

View file

@ -1,17 +0,0 @@
package cmd
import "github.com/spf13/cobra"
func accountDeleteCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "delete [usernames]",
Short: "Delete the saved accounts",
Long: "Delete accounts. " +
"Accepts space-separated list of usernames. " +
"If no arguments, all records will be deleted.",
}
cmd.Flags().BoolP("yes", "y", false, "Skip confirmation prompt and delete ALL accounts")
return cmd
}

View file

@ -1,16 +0,0 @@
package cmd
import "github.com/spf13/cobra"
func accountPrintCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "print",
Short: "Print the saved accounts",
Args: cobra.NoArgs,
Aliases: []string{"list", "ls"},
}
cmd.Flags().StringP("search", "s", "", "Search accounts by username")
return cmd
}

View file

@ -1,20 +0,0 @@
package cmd
import (
"github.com/spf13/cobra"
)
func accountCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "account",
Short: "Manage account for accessing web interface",
}
cmd.AddCommand(
accountAddCmd(),
accountPrintCmd(),
accountDeleteCmd(),
)
return cmd
}

View file

@ -35,7 +35,6 @@ func ShioriCmd() *cobra.Command {
exportCmd(),
pocketCmd(),
serveCmd(),
accountCmd(),
)
return rootCmd