From 91532085c784173ade3a5ba2d09a77884f277229 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Fri, 21 Sep 2018 22:29:54 -0700 Subject: [PATCH] add more text --- main.go | 8 ++++++-- src/relay/relay.go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index c3fa0f2..d2fa1fb 100644 --- a/main.go +++ b/main.go @@ -131,14 +131,18 @@ func send(c *cli.Context) error { } } 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)), fileOrFolder, filename, 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 { diff --git a/src/relay/relay.go b/src/relay/relay.go index becaa77..c8ad2f9 100644 --- a/src/relay/relay.go +++ b/src/relay/relay.go @@ -14,7 +14,7 @@ func Run(port string) (err error) { logger.SetLogLevel(DebugLevel) 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) { serveWs(w, r) })