Canonical guidance

Use when

Avoid

Preferred pattern

package httpapi

import "example.com/acme/inventory/internal/store"

type Server struct {
	Store *store.Store
}

Anti-pattern

/controllers
/services
/repositories
/helpers
/utils

Explanation: This anti-pattern is tempting because framework taxonomies feel organized, but they usually increase indirection without improving Go package boundaries.

Why

Related pages

Sources