Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.

Commit 81f11e1

Browse files
committed
shorten local variable names
no_proxy_var -> name no_proxy_value -> val
1 parent 3c74ca3 commit 81f11e1

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

cmds.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,21 +237,21 @@ func exports(socket, certPath string) map[string]string {
237237
ip := matches[1]
238238

239239
//first check for an existing lower case no_proxy var
240-
no_proxy_var := "no_proxy"
241-
no_proxy_value := os.Getenv("no_proxy")
242240
//otherweise try allcaps HTTP_PROXY
243-
if no_proxy_value == "" {
244-
no_proxy_var = "NO_PROXY"
245-
no_proxy_value = os.Getenv("NO_PROXY")
241+
name := "no_proxy"
242+
val := os.Getenv("no_proxy")
243+
if val == "" {
244+
name = "NO_PROXY"
245+
val = os.Getenv("NO_PROXY")
246246
}
247247

248248
switch {
249-
case no_proxy_value == "":
250-
out[no_proxy_var] = ip
251-
case strings.Contains(no_proxy_value, ip):
252-
out[no_proxy_var] = no_proxy_value
249+
case val == "":
250+
out[name] = ip
251+
case strings.Contains(val, ip):
252+
out[name] = val
253253
default:
254-
out[no_proxy_var] = fmt.Sprintf("%s,%s", no_proxy_value, ip)
254+
out[name] = fmt.Sprintf("%s,%s", val, ip)
255255
}
256256
}
257257
}

0 commit comments

Comments
 (0)