mirror of https://github.com/golang/go.git
cmd/go: break after terminal loop condition
After the first time needCostly is set to true, there is no need to continue checking the remaining args.
This commit is contained in:
parent
5d1378143b
commit
6d0c19341b
|
|
@ -217,6 +217,7 @@ func runEnv(ctx context.Context, cmd *base.Command, args []string) {
|
|||
needCostly = true
|
||||
} else {
|
||||
needCostly = false
|
||||
checkCostly:
|
||||
for _, arg := range args {
|
||||
switch argKey(arg) {
|
||||
case "CGO_CFLAGS",
|
||||
|
|
@ -227,6 +228,7 @@ func runEnv(ctx context.Context, cmd *base.Command, args []string) {
|
|||
"PKG_CONFIG",
|
||||
"GOGCCFLAGS":
|
||||
needCostly = true
|
||||
break checkCostly
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue