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

Unified Diff: src/cmd/go/run.go

Issue 5732045: code review 5732045: cmd/go: fix relative imports again (Closed)
Patch Set: diff -r 3fdde99ed034 https://code.google.com/p/go/ Created 13 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/go/pkg.go ('k') | src/cmd/go/test.bash » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/go/run.go
===================================================================
--- a/src/cmd/go/run.go
+++ b/src/cmd/go/run.go
@@ -45,6 +45,12 @@
}
files, cmdArgs := args[:i], args[i:]
p := goFilesPackage(files)
+ if p.Error != nil {
+ fatalf("%s", p.Error)
+ }
+ if p.Name != "main" {
+ fatalf("cannot run non-main package")
+ }
p.target = "" // must build - not up to date
a1 := b.action(modeBuild, modeBuild, p)
a := &action{f: (*builder).runProgram, args: cmdArgs, deps: []*action{a1}}
« no previous file with comments | « src/cmd/go/pkg.go ('k') | src/cmd/go/test.bash » ('j') | no next file with comments »

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