mirror of
https://github.com/golang/go
synced 2024-11-22 00:54:43 -07:00
cmd/go: allow underscores in tool name
Otherwise we can't invoke go_bootstrap directly. R=golang-dev, r CC=golang-dev https://golang.org/cl/5900061
This commit is contained in:
parent
d1f6e27880
commit
304404895d
@ -59,10 +59,10 @@ func runTool(cmd *Command, args []string) {
|
||||
return
|
||||
}
|
||||
toolName := args[0]
|
||||
// The tool name must be lower-case letters and numbers.
|
||||
// The tool name must be lower-case letters, numbers or underscores.
|
||||
for _, c := range toolName {
|
||||
switch {
|
||||
case 'a' <= c && c <= 'z', '0' <= c && c <= '9':
|
||||
case 'a' <= c && c <= 'z', '0' <= c && c <= '9', c == '_':
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "go tool: bad tool name %q\n", toolName)
|
||||
setExitStatus(2)
|
||||
|
Loading…
Reference in New Issue
Block a user