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:
parent
e5b3e6e06e
commit
1add7e94c9
3 changed files with 23 additions and 3 deletions
5
main.go
5
main.go
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue