Getting Started

Initialise with go mod init github.com/willdollman/project-name

Directory Structure

How to structure a Go project? · vsupalov.com 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: