Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into tests-10122023
Browse files Browse the repository at this point in the history
* origin/master:
  work behind proxy
  work behind proxy
  • Loading branch information
juev committed Dec 12, 2023
2 parents 6498b3d + e3aeb88 commit 0307901
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 6 additions & 0 deletions cmd/gobrew/main.go
Expand Up @@ -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 + `
Expand Down
12 changes: 1 addition & 11 deletions helpers.go
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io"
"log"
"net"
"net/http"
"net/url"
"os"
Expand All @@ -15,7 +14,6 @@ import (
"runtime"
"sort"
"strings"
"time"

"github.com/Masterminds/semver"
"github.com/c4milo/unpackit"
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 0307901

Please sign in to comment.