That is by design. All import paths should be complete, absolute paths, and 
that is enforced as much as possible.

When somebody moves or copy a file to another directory structure, the 
program behaviour is preserved, even if by chance there is a similarly 
named package nearby.

If "../serial" was allowed, the semantics would be "import any package 
called serial that happens to be found in a sibling directory". By using 
the full path you are stating "I want Basile Starynkevitch's serial 
package. Refuse imitations!"

On Monday, February 27, 2017 at 9:20:44 AM UTC-3, Basile Starynkevitch 
wrote:
>
> I tried (and I would prefer) to code 
>    serialmo "../serial"
> but that does not work.
>
>

-- 
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