mirror of
https://github.com/openziti/zrok.git
synced 2025-06-12 21:06:41 +02:00
'create account' -> 'invite'
This commit is contained in:
parent
340534f06a
commit
b913aaee85
@ -9,31 +9,25 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
createCmd.AddCommand(newCreateAccountCommand().cmd)
|
rootCmd.AddCommand(newInviteCommand().cmd)
|
||||||
rootCmd.AddCommand(createCmd)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var createCmd = &cobra.Command{
|
type inviteCommand struct {
|
||||||
Use: "create",
|
|
||||||
Short: "Create objects",
|
|
||||||
}
|
|
||||||
|
|
||||||
type createAccountCommand struct {
|
|
||||||
cmd *cobra.Command
|
cmd *cobra.Command
|
||||||
}
|
}
|
||||||
|
|
||||||
func newCreateAccountCommand() *createAccountCommand {
|
func newInviteCommand() *inviteCommand {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "account",
|
Use: "invite",
|
||||||
Short: "Create new zrok account",
|
Short: "Invite a new user to zrok",
|
||||||
Args: cobra.ExactArgs(0),
|
Args: cobra.ExactArgs(0),
|
||||||
}
|
}
|
||||||
command := &createAccountCommand{cmd: cmd}
|
command := &inviteCommand{cmd: cmd}
|
||||||
cmd.Run = command.run
|
cmd.Run = command.run
|
||||||
return command
|
return command
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cmd *createAccountCommand) run(_ *cobra.Command, _ []string) {
|
func (cmd *inviteCommand) run(_ *cobra.Command, _ []string) {
|
||||||
email, err := term.Prompt("New Email: ")
|
email, err := term.Prompt("New Email: ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
Loading…
x
Reference in New Issue
Block a user