mirror of https://github.com/schollz/croc.git
add more text
This commit is contained in:
parent
f3eb85dd95
commit
91532085c7
8
main.go
8
main.go
|
@ -131,14 +131,18 @@ func send(c *cli.Context) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Fprintf(os.Stderr,
|
fmt.Fprintf(os.Stderr,
|
||||||
"Sending %s %s name '%s'\nCode is: %s\nOn the other computer, please run:\n\ncroc %s",
|
"Sending %s %s name '%s'\nCode is: %s\nOn the other computer, please run:\n\ncroc %s\n\n",
|
||||||
humanize.Bytes(uint64(fsize)),
|
humanize.Bytes(uint64(fsize)),
|
||||||
fileOrFolder,
|
fileOrFolder,
|
||||||
filename,
|
filename,
|
||||||
codePhrase,
|
codePhrase,
|
||||||
codePhrase,
|
codePhrase,
|
||||||
)
|
)
|
||||||
return cr.Send(fname, codePhrase)
|
err = cr.Send(fname, codePhrase)
|
||||||
|
if err == nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "\nTransfer complete")
|
||||||
|
}
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func receive(c *cli.Context) error {
|
func receive(c *cli.Context) error {
|
||||||
|
|
|
@ -14,7 +14,7 @@ func Run(port string) (err error) {
|
||||||
logger.SetLogLevel(DebugLevel)
|
logger.SetLogLevel(DebugLevel)
|
||||||
|
|
||||||
go h.run()
|
go h.run()
|
||||||
log.Info("running relay on " + port)
|
log.Debug("running relay on " + port)
|
||||||
http.HandleFunc("/ws", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/ws", func(w http.ResponseWriter, r *http.Request) {
|
||||||
serveWs(w, r)
|
serveWs(w, r)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue