1
0
mirror of https://github.com/golang/go synced 2024-11-08 06:26:19 -07:00
go/src/cmd
Russ Cox 9ccfde6ee7 cmd/go: add support for 'go run pkg' or 'go run .'
To date, go run has required a list of .go files.
This CL allows in place of that list a single import path
or a directory name or a pattern matching a single patckage.
This allows 'go run pkg' or 'go run dir', most importantly 'go run .'.

The discussion in #22726 gives more motivation.
The basic idea is that you can already run 'go test .'
but if you're developing a command it's pretty awkward
to iterate at the same speed. This lets you do that,
by using 'go run . [args]'.

Fixes #22726.

Change-Id: Ibfc8172a4f752588ad96df0a6b0928e9b61fa27f
Reviewed-on: https://go-review.googlesource.com/109341
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2018-05-10 19:15:27 +00:00
..
addr2line
api
asm cmd/internal/obj/arm64: fix illegal 4-operand instructions accepted arm64 bug 2018-05-07 15:12:35 +00:00
buildid
cgo cmd/cgo: visit cgo type inside ellipsis node 2018-05-01 00:44:48 +00:00
compile cmd/compile: fix zero extend after float->int conversion 2018-05-10 17:32:43 +00:00
cover all: use strings.Builder instead of bytes.Buffer where appropriate 2018-03-26 23:05:53 +00:00
dist cmd/link: add wasm architecture 2018-05-07 23:29:33 +00:00
doc cmd/doc: skip directories like other go tools 2018-05-01 05:02:43 +00:00
fix
go cmd/go: add support for 'go run pkg' or 'go run .' 2018-05-10 19:15:27 +00:00
gofmt
internal cmd/internal/obj/wasm: avoid invalid offsets for Load/Store 2018-05-10 12:05:17 +00:00
link cmd/link: add wasm architecture 2018-05-07 23:29:33 +00:00
nm
objdump
pack cmd: remove some unused parameters 2018-04-02 15:51:31 +00:00
pprof go/printer, gofmt: tuned table alignment for better results 2018-04-04 13:39:34 -07:00
test2json cmd/test2json: document missing "skip" action 2018-03-24 18:37:22 +00:00
trace cmd/trace: handle invalid goid para in /trace 2018-05-08 19:25:01 +00:00
vendor cmd/vendor/.../pprof: update to 520140b6bf47519c766e8380e5f094576347b016 2018-05-09 16:42:28 +00:00
vet cmd/vet: assume that no builtin funcs are pure 2018-05-09 05:13:03 +00:00