'create account' -> 'invite'

This commit is contained in:
Michael Quigley 2022-09-23 15:56:50 -04:00
parent 340534f06a
commit b913aaee85
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -9,31 +9,25 @@ import (
)
func init() {
createCmd.AddCommand(newCreateAccountCommand().cmd)
rootCmd.AddCommand(createCmd)
rootCmd.AddCommand(newInviteCommand().cmd)
}
var createCmd = &cobra.Command{
Use: "create",
Short: "Create objects",
}
type createAccountCommand struct {
type inviteCommand struct {
cmd *cobra.Command
}
func newCreateAccountCommand() *createAccountCommand {
func newInviteCommand() *inviteCommand {
cmd := &cobra.Command{
Use: "account",
Short: "Create new zrok account",
Use: "invite",
Short: "Invite a new user to zrok",
Args: cobra.ExactArgs(0),
}
command := &createAccountCommand{cmd: cmd}
command := &inviteCommand{cmd: cmd}
cmd.Run = command.run
return command
}
func (cmd *createAccountCommand) run(_ *cobra.Command, _ []string) {
func (cmd *inviteCommand) run(_ *cobra.Command, _ []string) {
email, err := term.Prompt("New Email: ")
if err != nil {
panic(err)