Skip to content

Commit 7632c6e

Browse files
cuishuangmatloob
authored andcommitted
cmd/go: add go prefix in base.Fatalf
For #70537 Change-Id: I20e239611f07aa13915367c3a44994a43b5482d7 Reviewed-on: https://go-review.googlesource.com/c/go/+/631535 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Veronica Silina <[email protected]> Reviewed-by: Michael Matloob <[email protected]>
1 parent 3374abe commit 7632c6e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/cmd/go/internal/auth/auth.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ func runGoAuth(client *http.Client, res *http.Response, url string) {
6060
command = strings.TrimSpace(command)
6161
words := strings.Fields(command)
6262
if len(words) == 0 {
63-
base.Fatalf("GOAUTH encountered an empty command (GOAUTH=%s)", cfg.GOAUTH)
63+
base.Fatalf("go: GOAUTH encountered an empty command (GOAUTH=%s)", cfg.GOAUTH)
6464
}
6565
switch words[0] {
6666
case "off":
6767
if len(goAuthCmds) != 1 {
68-
base.Fatalf("GOAUTH=off cannot be combined with other authentication commands (GOAUTH=%s)", cfg.GOAUTH)
68+
base.Fatalf("go: GOAUTH=off cannot be combined with other authentication commands (GOAUTH=%s)", cfg.GOAUTH)
6969
}
7070
return
7171
case "netrc":
7272
lines, err := readNetrc()
7373
if err != nil {
74-
base.Fatalf("could not parse netrc (GOAUTH=%s): %v", cfg.GOAUTH, err)
74+
base.Fatalf("go: could not parse netrc (GOAUTH=%s): %v", cfg.GOAUTH, err)
7575
}
7676
for _, l := range lines {
7777
r := http.Request{Header: make(http.Header)}
@@ -80,18 +80,18 @@ func runGoAuth(client *http.Client, res *http.Response, url string) {
8080
}
8181
case "git":
8282
if len(words) != 2 {
83-
base.Fatalf("GOAUTH=git dir method requires an absolute path to the git working directory")
83+
base.Fatalf("go: GOAUTH=git dir method requires an absolute path to the git working directory")
8484
}
8585
dir := words[1]
8686
if !filepath.IsAbs(dir) {
87-
base.Fatalf("GOAUTH=git dir method requires an absolute path to the git working directory, dir is not absolute")
87+
base.Fatalf("go: GOAUTH=git dir method requires an absolute path to the git working directory, dir is not absolute")
8888
}
8989
fs, err := os.Stat(dir)
9090
if err != nil {
91-
base.Fatalf("GOAUTH=git encountered an error; cannot stat %s: %v", dir, err)
91+
base.Fatalf("go: GOAUTH=git encountered an error; cannot stat %s: %v", dir, err)
9292
}
9393
if !fs.IsDir() {
94-
base.Fatalf("GOAUTH=git dir method requires an absolute path to the git working directory, dir is not a directory")
94+
base.Fatalf("go: GOAUTH=git dir method requires an absolute path to the git working directory, dir is not a directory")
9595
}
9696

9797
if url == "" {

0 commit comments

Comments
 (0)