• Roger Peppe's avatar
    cmd/go: add join template function. · 9714691a
    Roger Peppe authored
    It's common to use the go list command in shell scripts, but
    currently it's awkward to print a string slice from the Package
    type in a way that's easily parseable by the shell.  For example:
    
            go list -f '{{range .Deps}}{{.}}
            {{end}}'
    
    (and even that prints an unwanted new line at the end|).
    
    To make this easier, this CL adds a "join" function to the
    format template.
    
            go list -f '{{join .Deps "\n"}}'
    
    R=rsc, dsymonds, minux.ma, remyoudompheng, r
    CC=golang-dev
    https://golang.org/cl/6680044
    9714691a
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...