Skip to content

Commit

Permalink
change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
eshitachandwani committed Nov 22, 2024
1 parent 4ba3578 commit fa55e5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/resolver/delegatingresolver/delegatingresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (

var (
// The following variable will be overwritten in the tests.

Check failure on line 38 in internal/resolver/delegatingresolver/delegatingresolver.go

View workflow job for this annotation

GitHub Actions / tests (vet, 1.22)

comment on exported var HTTPSProxyFromEnvironment should be of the form "HTTPSProxyFromEnvironment ..." https://revive.run/r#exported
HttpsProxyFromEnvironment = http.ProxyFromEnvironment
HTTPSProxyFromEnvironment = http.ProxyFromEnvironment

logger = grpclog.Component("delegating-resolver")
)
Expand All @@ -62,7 +62,7 @@ func mapAddress(address string) (*url.URL, error) {
Host: address,
},
}
url, err := HttpsProxyFromEnvironment(req)
url, err := HTTPSProxyFromEnvironment(req)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ const (
resolvedProxyTestAddr1 = "2.3.4.6:7687"
)

// overwriteAndRestore overwrite function HttpsProxyFromEnvironment and
// overwriteAndRestore overwrite function HTTPSProxyFromEnvironment and
// returns a function to restore the default values.
func overwrite(hpfe func(req *http.Request) (*url.URL, error)) func() {
backHPFE := HttpsProxyFromEnvironment
HttpsProxyFromEnvironment = hpfe
backHPFE := HTTPSProxyFromEnvironment
HTTPSProxyFromEnvironment = hpfe
return func() {
HttpsProxyFromEnvironment = backHPFE
HTTPSProxyFromEnvironment = backHPFE
}
}

Expand Down

0 comments on commit fa55e5b

Please sign in to comment.