In my application, I have a structure that holds a function that returns me an implementation of an interface.
type Registry struct { Model map[string]func()