diff --git a/main.go b/main.go index 811f45d..183934f 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "time" "github.com/schollz/croc/src/croc" + "github.com/schollz/utils" "github.com/urfave/cli" ) @@ -107,6 +108,10 @@ func send(c *cli.Context) error { if c.String("code") != "" { codePhrase = c.String("code") } + if len(codePhrase) == 0 { + // generate code phrase + codePhrase = utils.GetRandomName() + } return cr.Send(fname, codePhrase) }