Skip to content

Commit

Permalink
Merge #12
Browse files Browse the repository at this point in the history
Use https as the default scheme if scheme is not given
  • Loading branch information
melbahja authored Aug 11, 2020
2 parents 8c6db2f + e1716ba commit c1c7cf0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/got/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ func main() {
if url = flag.Arg(0); url == "" {
log.Fatal("Empty download url.")
}
if !(url[:7] == "http://" || url[:8] == "https://") {
url = "https://" + url
}

if *dest == "" {
*dest = got.GetFilename(url)
Expand Down

0 comments on commit c1c7cf0

Please sign in to comment.