package ir
var (
- // maximum size variable which we will allocate on the stack.
+ // MaxStackVarSize is the maximum size variable which we will allocate on the stack.
// This limit is for explicit variable declarations like "var x T" or "x := ...".
// Note: the flag smallframes can update this value.
MaxStackVarSize = int64(10 * 1024 * 1024)
- // maximum size of implicit variables that we will allocate on the stack.
+ // MaxImplicitStackVarSize is the maximum size of implicit variables that we will allocate on the stack.
// p := new(T) allocating T on the stack
// p := &T{} allocating T on the stack
// s := make([]T, n) allocating [n]T on the stack
//
var (
- // proxyConfigOnce guards proxyConfig
envProxyOnce sync.Once
envProxyFuncValue func(*url.URL) (*url.URL, error)
)
-// defaultProxyConfig returns a ProxyConfig value looked up
-// from the environment. This mitigates expensive lookups
-// on some platforms (e.g. Windows).
+// envProxyFunc returns a function that reads the
+// environment variable to determine the proxy address.
func envProxyFunc() func(*url.URL) (*url.URL, error) {
envProxyOnce.Do(func() {
envProxyFuncValue = httpproxy.FromEnvironment().ProxyFunc()
// immediate cancellation of dials.
aLongTimeAgo = time.Unix(1, 0)
- // nonDeadline and noCancel are just zero values for
+ // noDeadline and noCancel are just zero values for
// readability with functions taking too many parameters.
noDeadline = time.Time{}
noCancel = (chan struct{})(nil)