cmd/go: improve error message for names forbidden by Windows

Fixes #29589

Change-Id: I69ad461e70b236d9729a42053e35128437449e32
Reviewed-on: https://go-review.googlesource.com/c/156658
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/src/cmd/go/internal/module/module.go b/src/cmd/go/internal/module/module.go
index 8afd273..481a90b 100644
--- a/src/cmd/go/internal/module/module.go
+++ b/src/cmd/go/internal/module/module.go
@@ -226,7 +226,7 @@
 	}
 	for _, bad := range badWindowsNames {
 		if strings.EqualFold(bad, short) {
-			return fmt.Errorf("disallowed path element %q", elem)
+			return fmt.Errorf("%q disallowed as path element component on Windows", short)
 		}
 	}
 	return nil