Getting Started

Initialise with go mod init

Directory Structure

How to structure a Go project? · seems like a reasonable summary and acknowledges that things have changed since the introduction of Go modules.

Designing Package Layout

Standard Package Layout has some good ideas about how this should work.

Essentially the root package contains high-level "domain" types which can be implemented by other packages which work like interchangeable components.

Debugging Local Module Imports

This can be tricky when starting out, as there are lots of small, easy-to-make mistakes.

Some debugging suggestions/mistakes I've made: