On Sun, Sep 24, 2017 at 5:33 PM,  <beach...@morris.umn.edu> wrote:
>
> The fact that importing a main package in a non main-package isn't supported
> ought to be in the Go spec.

Yes, probably.  Want to open an issue about it at https://golang.org/issue ?

Technically, from the language perspective, I think the current
implementation forbids literally `import "main"`.  It permits
importing a package whose package name is "main", as long as a
different path is used to import it.  The go tool may impose other
restrictions--offhand I don't recall--but those restrictions, if any,
don't necessarily belong in the language spec.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to