Probably you are overthinking it. Start like this go mod init me.nil/project
It doesn't matter whether you want to publish your project or not you must start with a module and a proper name including a dot and a slash doesn't harm and avoids several problems. Of course you also could name it github.com/yourname/yourproject. If you do not want to publish it, it really doesn't matter. Add a main.go an make packages to your liking: vi main.go mkdir foo vi foo/foo.go And so on. There is _no_ need for go mod vendor at all, especially not if you do not want to publish your project. V. On Tuesday, 6 April 2021 at 09:47:18 UTC+2 Gergely Födémesi wrote: > Hi, > > assuming GO111MODULE=on. > I don't want to publish anything, anywhere. > > Beside the main package, I want to put functionality into other new > packages as well. > Could somebody share the workflow to do _only_ that? > Where can I read about the correct incantations? > > To organize the source files on > https://golang.org/ref/mod#go-mod-vendor this is not enough > information for me: > "The go mod vendor command constructs a directory named vendor in the > main module's root directory that contains copies of all packages > needed to support builds and tests of packages in the main module. " > > How, does the "go mod vendor" command construct the vendor directory? > Where does it copy the files from? > How is the copy instructed (what to copy, what not to copy)? > > thanks! > -- 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/26800666-75d6-4086-b850-18290407aa66n%40googlegroups.com.