Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(214)

Issue 50970043: code review 50970043: cmd/go: run main package when no files are listed

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 3 months ago by Dominik Honnef
Modified:
9 years, 4 months ago
Reviewers:
CC:
r, rsc, dave_cheney.net, minux1, gobot, golang-codereviews
Visibility:
Public.

Description

cmd/go: run main package when no files are listed Additionally to the currently supported invocations, this change allows running the current package with a bare "go run". Fixes issue 5164.

Patch Set 1 #

Total comments: 6

Patch Set 2 : diff -r 7ecbc2b8ec97 https://code.google.com/p/go #

Patch Set 3 : diff -r 7ecbc2b8ec97 https://code.google.com/p/go #

Patch Set 4 : diff -r 7ecbc2b8ec97 https://code.google.com/p/go #

Total comments: 1

Patch Set 5 : diff -r 7ecbc2b8ec97 https://code.google.com/p/go #

Patch Set 6 : diff -r 7ecbc2b8ec97 https://code.google.com/p/go #

Total comments: 1

Patch Set 7 : diff -r 7ecbc2b8ec97 https://code.google.com/p/go #

Patch Set 8 : diff -r 7ecbc2b8ec97 https://code.google.com/p/go #

Total comments: 1

Patch Set 9 : diff -r 7ecbc2b8ec97 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -12 lines) Patch
M src/cmd/go/doc.go View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -1 line 0 comments Download
M src/cmd/go/run.go View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -11 lines 0 comments Download

Messages

Total messages: 31
Dominik Honnef
Hello r, rsc (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 3 months ago (2014-01-12 15:58:49 UTC) #1
r
https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go File src/cmd/go/run.go (right): https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go#newcode19 src/cmd/go/run.go:19: A Go source file is defined to be a ...
10 years, 3 months ago (2014-01-12 16:34:30 UTC) #2
Dominik Honnef
https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go File src/cmd/go/run.go (right): https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go#newcode19 src/cmd/go/run.go:19: A Go source file is defined to be a ...
10 years, 3 months ago (2014-01-12 16:39:12 UTC) #3
r
https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go File src/cmd/go/run.go (right): https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go#newcode19 src/cmd/go/run.go:19: A Go source file is defined to be a ...
10 years, 3 months ago (2014-01-12 18:51:57 UTC) #4
r
https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go File src/cmd/go/run.go (right): https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go#newcode19 src/cmd/go/run.go:19: A Go source file is defined to be a ...
10 years, 3 months ago (2014-01-12 18:52:58 UTC) #5
Dominik Honnef
https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go File src/cmd/go/run.go (right): https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go#newcode19 src/cmd/go/run.go:19: A Go source file is defined to be a ...
10 years, 3 months ago (2014-01-12 19:02:34 UTC) #6
r
https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go File src/cmd/go/run.go (right): https://codereview.appspot.com/50970043/diff/1/src/cmd/go/run.go#newcode19 src/cmd/go/run.go:19: A Go source file is defined to be a ...
10 years, 3 months ago (2014-01-12 22:08:41 UTC) #7
Dominik Honnef
Hello r@golang.org, rsc@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 3 months ago (2014-01-12 22:19:23 UTC) #8
r
Looks good as far as documentation is concerned. Thanks. For the code, I defer to ...
10 years, 3 months ago (2014-01-12 22:24:34 UTC) #9
dave_cheney.net
On 2014/01/12 22:24:34, r wrote: > Looks good as far as documentation is concerned. Thanks. ...
10 years, 3 months ago (2014-01-31 05:04:15 UTC) #10
minux1
On Jan 31, 2014 12:04 AM, <dave@cheney.net> wrote: > A frequent question on the mailing ...
10 years, 3 months ago (2014-01-31 05:33:31 UTC) #11
Dominik Honnef
On 2014/01/31 05:33:31, minux wrote: > On Jan 31, 2014 12:04 AM, <mailto:dave@cheney.net> wrote: > ...
10 years, 3 months ago (2014-01-31 12:15:38 UTC) #12
Dominik Honnef
PTAL Trying to get the status in the dashboard right. Also awaiting a final verdict ...
10 years, 2 months ago (2014-02-20 21:19:54 UTC) #13
rsc
The idea is fine, but the "." is awkward. Let's remove it. (If "go run ...
10 years, 2 months ago (2014-02-24 15:24:45 UTC) #14
rsc
FWIW, I did think about making the first argument always be an import path, generalizing ...
10 years, 2 months ago (2014-02-24 15:26:20 UTC) #15
gobot
R=r@golang.org (assigned by r@golang.org)
10 years, 2 months ago (2014-02-24 20:21:41 UTC) #16
gobot
R=rsc@golang.org (assigned by r@golang.org)
10 years, 2 months ago (2014-02-24 20:21:59 UTC) #17
Dominik Honnef
PTAL "." is gone. The only way to run the current package without specifying any ...
10 years, 2 months ago (2014-02-24 23:16:52 UTC) #18
rsc
https://codereview.appspot.com/50970043/diff/100001/src/cmd/go/run.go File src/cmd/go/run.go (right): https://codereview.appspot.com/50970043/diff/100001/src/cmd/go/run.go#newcode62 src/cmd/go/run.go:62: if len(cmdArgs) > 0 && len(files) == 0 { ...
10 years, 2 months ago (2014-03-03 15:48:37 UTC) #19
Dominik Honnef
Hello r@golang.org, rsc@golang.org, dave@cheney.net, minux.ma@gmail.com, gobot@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 2 months ago (2014-03-03 15:52:59 UTC) #20
rsc
https://codereview.appspot.com/50970043/diff/140001/src/cmd/go/run.go File src/cmd/go/run.go (right): https://codereview.appspot.com/50970043/diff/140001/src/cmd/go/run.go#newcode25 src/cmd/go/run.go:25: verbatim to the executable. To avoid ambiguities in flag ...
10 years, 2 months ago (2014-03-03 16:52:09 UTC) #21
Dominik Honnef
On 2014/03/03 16:52:09, rsc wrote: > https://codereview.appspot.com/50970043/diff/140001/src/cmd/go/run.go > File src/cmd/go/run.go (right): > > https://codereview.appspot.com/50970043/diff/140001/src/cmd/go/run.go#newcode25 > ...
10 years, 2 months ago (2014-03-03 16:55:50 UTC) #22
minux1
On Mar 3, 2014 11:55 AM, <dominik.honnef@gmail.com> wrote: > https://codereview.appspot.com/50970043/diff/140001/src/cmd/go/run.go#newcode25 >> >> src/cmd/go/run.go:25: verbatim to ...
10 years, 2 months ago (2014-03-03 18:42:46 UTC) #23
Dominik Honnef
Updated the CL description, regenerated the documentation. A lot of churn for what turns out ...
10 years, 2 months ago (2014-03-03 20:16:40 UTC) #24
rsc
-- doesn't really do what you want either. I'd like to think more about this.
10 years, 2 months ago (2014-03-03 21:48:32 UTC) #25
rsc
I really like 'go run foo' meaning run the current directory's command with argument foo, ...
9 years, 12 months ago (2014-05-13 00:11:28 UTC) #26
Dominik Honnef
Russ, should I re-send this CL for the new code review system, or is there ...
9 years, 4 months ago (2014-12-18 09:39:43 UTC) #27
rsc
On 2014/12/18 09:39:43, Dominik Honnef wrote: > Russ, should I re-send this CL for the ...
9 years, 4 months ago (2014-12-18 15:37:54 UTC) #28
rsc
I will add that if you want to write a separate script to do this, ...
9 years, 4 months ago (2014-12-18 15:39:58 UTC) #29
Dominik Honnef
On 2014/12/18 15:39:58, rsc wrote: > I will add that if you want to write ...
9 years, 4 months ago (2014-12-19 02:40:15 UTC) #30
gobot
9 years, 4 months ago (2014-12-19 05:18:00 UTC) #31
R=close

To the author of this CL:

The Go project has moved to Gerrit Code Review.

If this CL should be continued, please see the latest version of
https://golang.org/doc/contribute.html for instructions on
how to set up Git and the Go project's Gerrit codereview plugin,
and then create a new change with your current code.

If there has been discussion on this CL, please give a link to it
(golang.org/cl/50970043 is best) in the description in your
new CL.

Thanks very much.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b