1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-10 21:01:02 +02:00

get receive code if empty

This commit is contained in:
Zack Scholl 2018-09-22 06:10:41 -07:00
parent e5b3e6e06e
commit 1add7e94c9
3 changed files with 23 additions and 3 deletions

View file

@ -9,7 +9,7 @@ import (
humanize "github.com/dustin/go-humanize"
"github.com/schollz/croc/src/croc"
"github.com/schollz/utils"
"github.com/schollz/croc/src/utils"
"github.com/urfave/cli"
)
@ -154,6 +154,9 @@ func receive(c *cli.Context) error {
if c.Args().First() != "" {
codePhrase = c.Args().First()
}
if codePhrase == "" {
codePhrase = utils.GetInput("Enter receive code: ")
}
return cr.Receive(codePhrase)
}