Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.

Commit bdae52f

Browse files
committed
Simplify download url generation
1 parent 8662713 commit bdae52f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cmds.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,11 @@ func cmdDownload() error {
576576
host := matches[1]
577577
org := matches[3]
578578
repo := matches[4]
579-
fmt.Printf("Latest release for %s/%s is %s\n", org, repo, tag)
580579
if host == "api.github.com" {
581-
url = fmt.Sprintf("https://github.com/%s/%s/releases/download/%s/boot2docker.iso", org, repo, tag)
582-
} else {
583-
url = fmt.Sprintf("https://%s/%s/%s/releases/download/%s/boot2docker.iso", host, org, repo, tag)
580+
host = "github.com"
584581
}
582+
fmt.Printf("Latest release for %s/%s/%s is %s\n", host, org, repo, tag)
583+
url = fmt.Sprintf("https://%s/%s/%s/releases/download/%s/boot2docker.iso", host, org, repo, tag)
585584
}
586585

587586
fmt.Println("Downloading boot2docker ISO image...")

0 commit comments

Comments
 (0)