thanks

On Friday, November 18, 2022 at 1:10:40 PM UTC-5 Brian Candler wrote:

> You still should have a go.mod.  Even if you don't intend to publish your 
> code anywhere, you give it a module name - anything will do as long as it 
> meets the syntax requirements.
>

OK, I can have a go.mod
But don''t I need to have a "package main" in order to get an executable?

If you need to split your code into other packages, you can put those in 
> subdirectories.  Those don't need their own go.mod files.  The path for 
> each package is the path from the outer go.mod file, concatenated with the 
> subdirectory.
>

Sure, once there is more than 25 lines of source code, subdirectories make 
sense.

Do I really need to have the source code deeply burried in names that tie 
it all to my github repository?
I'm using
       ~/sandbox/gows/src/github.com/pfarrell51/cmd
 
because "gows" is "go work space" with src code
and github/pfarrell51/cmd
is where I've kept all my shell/cmd program source.

Thanks
Pat

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c2e66b9f-29db-4a70-acbc-416461beee1en%40googlegroups.com.

Reply via email to