From 3891e874ca9f46f9d56f49130bf3c9e1da6248c3 Mon Sep 17 00:00:00 2001 From: Ruben Jenster Date: Fri, 31 Jul 2020 13:35:07 +0200 Subject: [PATCH] Rename http-password flag to http-passwd. Fix debug output. --- goget.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/goget.go b/goget.go index d7c5ce0..9f2a44a 100644 --- a/goget.go +++ b/goget.go @@ -31,7 +31,7 @@ func main() { var showVersion bool flag.StringVar(&c.User, "http-user", "", "HTTP auth username") - flag.StringVar(&c.Password, "http-password", "", "HTTP auth password") + flag.StringVar(&c.Password, "http-passwd", "", "HTTP auth password") flag.IntVar(&c.Retries, "retries", 1, "Number of retries in case of download errors.") flag.DurationVar(&c.RetryWait, "retry-wait", 2*time.Second, "Time to wait before retrying download.") flag.DurationVar(&c.ConnectTimeout, "connect-timeout", 5*time.Second, "TCP connections that take longer to establish will be aborted") @@ -74,7 +74,7 @@ func main() { } func (c *client) DownloadFile(filename string, url string) (err error) { - println("Downloading %s to file %s\n", url, filename) + fmt.Fprintf(os.Stderr, "downloading %s to file %s\n", url, filename) // Create the target file out, err := os.Create(filename) if err != nil {