cmd/go: use go.dev instead of golang.org in flag errors

Also add the URL to the one possible error that didn't have it.
It looks like CL 93836 just missed the third error case when
adding the URL.

Change-Id: I837f8a730b25adb42909c9dfbde0dad2f664fec5
Reviewed-on: https://go-review.googlesource.com/c/go/+/718220
Reviewed-by: Michael Matloob <matloob@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Russ Cox 2025-11-05 15:02:52 -05:00 committed by Gopher Robot
parent 28f1ad5782
commit 2dd7e94e16

View file

@ -375,13 +375,13 @@ Args:
} }
if i+1 < len(list) { if i+1 < len(list) {
return fmt.Errorf("invalid flag in %s: %s %s (see https://golang.org/s/invalidflag)", source, arg, list[i+1]) return fmt.Errorf("invalid flag in %s: %s %s (see https://go.dev/s/invalidflag)", source, arg, list[i+1])
} }
return fmt.Errorf("invalid flag in %s: %s without argument (see https://golang.org/s/invalidflag)", source, arg) return fmt.Errorf("invalid flag in %s: %s without argument (see https://go.dev/s/invalidflag)", source, arg)
} }
} }
Bad: Bad:
return fmt.Errorf("invalid flag in %s: %s", source, arg) return fmt.Errorf("invalid flag in %s: %s (see https://go.dev/s/invalidflag)", source, arg)
} }
return nil return nil
} }