/
signup.go
31 lines (26 loc) · 666 Bytes
/
signup.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package cmd
import (
"fmt"
"os"
"github.com/urfave/cli"
)
func init() {
signup := cli.Command{
Name: "signup",
Usage: "Create a new Torus account",
Category: "ACCOUNT",
Action: chain(ensureDaemon, signupCmd),
}
Cmds = append(Cmds, signup)
}
func signupCmd(ctx *cli.Context) error {
return signup(ctx, false)
}
// signup can be ran as a sub-command when an account is needed prior to running
// a particular action. the subCommand boolean signifies it is running as such
// and not as a generic signup
func signup(ctx *cli.Context, subCommand bool) error {
fmt.Println("Torus is no longer accepting signups.")
os.Exit(-1)
return nil
}