From: Shenghou Ma Date: Mon, 26 Mar 2012 02:01:17 +0000 (+0800) Subject: cmd/go: allow underscores in tool name X-Git-Tag: weekly.2012-03-27~48 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=304404895d2204f0557da4753684689198e20ccd;p=gostls13.git 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 --- diff --git a/src/cmd/go/tool.go b/src/cmd/go/tool.go index 9776d3359e..cb463a2e71 100644 --- a/src/cmd/go/tool.go +++ b/src/cmd/go/tool.go @@ -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)