Skip to content

Commit

Permalink
work behind proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Dec 12, 2023
1 parent ac689a5 commit 2ef1c8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/gobrew/main.go
Expand Up @@ -142,6 +142,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
1 change: 1 addition & 0 deletions helpers.go
Expand Up @@ -410,6 +410,7 @@ func (gb *GoBrew) getGolangVersions() (result []string) {
func doRequest(url string) (data []byte) {
client := &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
Dial: (&net.Dialer{
Timeout: 5 * time.Second,
}).Dial,
Expand Down

0 comments on commit 2ef1c8c

Please sign in to comment.