In-reply-to » I've started playing with Go today, just understood the basics and still a bit confused about the module and goroutine parts.

@carsten So I wanted to reply to this Yarn with some comments, but wasn’t able to really do so whilst out ‘n about camping with the family 😅 – Basically Go’s modules (the more recent version) is actually pretty good. Let me try to help you understand the basics of it…

When defining a new package/library, run go mod init (as an example). This could also be or anywhere else with a publicly accessible Git source. I recommend this as the easiest as things will “just work”™.

Next, never do development in $GOPATH as this is basically deprecated and gone now. Always code outside of $GOPATH and use modules as per above.

Finally if you are not ready to publish your work and you depend on foo and bar and maybe something else too (like’s codebase) then use $ go mod edit -replace /User/prologic/Projects/foo (as an example).

⤋ Read More