Given this code:
package main import ( \"fmt\" ) type datstr string type Guy interface { SomeDumbGuy() string } func (d *datstr) SomeDumbGuy() string
Google's Wire looks promising. There're some articles about it:
Compile-time Dependency Injection With Go Cloud's Wire
Go Dependency Injection with Wire