I like the idea that the go tool would enforce matching directory and 
package names.

This would help us in case we forget to be consistent...

On Wednesday, March 29, 2017 at 5:18:52 PM UTC+10, Dorival Pedroso wrote:
>
> Hello,
>
> I haven't noticed that the code below (located at *$GOPATH/src/MyWrapper*
> ):
>
> package mylib
>
> import "fmt"
>
> func SayHello() {
> fmt.Println("hello")
> }
>
> is actually being installed (go install) as a *MyWrapper* package, even 
> though the package name was explicitly given as *mylib*.
>
> I couldn't find in the documentation where the handling of this situation 
> is described; i.e. how the final package name is decided (apparently the 
> directory name is chosen).
>
> Anyway, so, why using *package mylib* then?
>
> Cheers.
> Dorival
>
>
>

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