diff --git a/cmd/gobrew/main.go b/cmd/gobrew/main.go index 6eb339f..866ad0a 100644 --- a/cmd/gobrew/main.go +++ b/cmd/gobrew/main.go @@ -155,6 +155,12 @@ func Find(slice []string, val string) (int, bool) { } func usage() string { + usageMsg := + ` +# Add gobrew to your ~/.bashrc or ~/.zshrc +export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH" +export GOROOT="$HOME/.gobrew/current/go" +` msg := ` gobrew ` + version + ` diff --git a/helpers.go b/helpers.go index 85c80a6..6296d23 100644 --- a/helpers.go +++ b/helpers.go @@ -6,7 +6,6 @@ import ( "fmt" "io" "log" - "net" "net/http" "net/url" "os" @@ -15,7 +14,6 @@ import ( "runtime" "sort" "strings" - "time" "github.com/Masterminds/semver" "github.com/c4milo/unpackit" @@ -398,15 +396,7 @@ func (gb *GoBrew) getGolangVersions() (result []string) { } func doRequest(url string) (data []byte) { - client := &http.Client{ - Transport: &http.Transport{ - Dial: (&net.Dialer{ - Timeout: 5 * time.Second, - }).Dial, - TLSHandshakeTimeout: 5 * time.Second, - }, - Timeout: 10 * time.Second, - } + client := &http.Client{} request, err := http.NewRequest("GET", url, nil) utils.CheckError(err, "==> [Error] Cannot create request")