mirror of
https://gitea.intern.drachenfels.de/ruben/goget.git
synced 2026-02-08 12:48:01 +00:00
Rename http-password flag to http-passwd. Fix debug output.
This commit is contained in:
4
goget.go
4
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 {
|
||||
|
||||
Reference in New Issue
Block a user