mirror of https://github.com/golang/go.git
The previous version of bundle simply joins together with a space " ".
While this works for simple arguments this causes problems when you
need to pass special strings like an empty string or a string
containing a space.
The following example shows how the previous version handles an empty
string argument `-prefix ""`.
//go:generate bundle -o /dev/stdout -prefix example.com/mod
This change quotes the arguments with strconv.Quote, if needed, before
joining together with a space:
//go:generate bundle -o /dev/stdout -prefix "" example.com/mod
Change-Id: Ic706a3bd7916515ba91dbe5e0def956703ab2988
GitHub-Last-Rev: 8dc0c88fc17c73bb432ed60a9578ec222814e68b
GitHub-Pull-Request: golang/tools#411
Reviewed-on: https://go-review.googlesource.com/c/tools/+/444956
Run-TryBot: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
|
||
|---|---|---|
| .. | ||
| auth | ||
| benchcmp | ||
| bundle | ||
| callgraph | ||
| compilebench | ||
| cover | ||
| digraph | ||
| eg | ||
| file2fuzz | ||
| fiximports | ||
| getgo | ||
| go-contrib-init | ||
| godex | ||
| godoc | ||
| goimports | ||
| gomvpkg | ||
| gorename | ||
| gotype | ||
| goyacc | ||
| guru | ||
| html2article | ||
| present | ||
| present2md | ||
| signature-fuzzer | ||
| splitdwarf | ||
| ssadump | ||
| stress | ||
| stringer | ||
| toolstash | ||