E0409: A dependency cycle
Constructing a type needs itself, through the chain the message shows. Reported at boot.
Wrong
go
func NewOrders(p *Payments) *Orders { … }
func NewPayments(o *Orders) *Payments { … }Right
go
func NewOrders(p *Payments) *Orders { … }
func NewPayments(db *DB) *Payments { … }