mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
flag is no compress
This commit is contained in:
parent
bc34811750
commit
7be11a6fda
2 changed files with 5 additions and 4 deletions
8
main.go
8
main.go
|
@ -34,8 +34,8 @@ func main() {
|
|||
Description: "send a file over the relay",
|
||||
ArgsUsage: "[filename]",
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolTFlag{Name: "compress, o"},
|
||||
cli.BoolTFlag{Name: "encrypt, e"},
|
||||
cli.BoolFlag{Name: "no-compress, o"},
|
||||
cli.BoolFlag{Name: "no-encrypt, e"},
|
||||
},
|
||||
HelpName: "croc send",
|
||||
Action: func(c *cli.Context) error {
|
||||
|
@ -113,8 +113,8 @@ func send(c *cli.Context) error {
|
|||
if fname == "" {
|
||||
return errors.New("must specify file: croc send [filename]")
|
||||
}
|
||||
cr.UseCompression = c.BoolT("compress")
|
||||
cr.UseEncryption = c.BoolT("encrypt")
|
||||
cr.UseCompression = !c.Bool("no-compress")
|
||||
cr.UseEncryption = !c.Bool("no-encrypt")
|
||||
return cr.Send(fname, c.GlobalString("code"))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue