I am writing a package with some functionality. My standard approach is to create an interface I and a struct that implements it, and a New() function that takes in config values and returns a *struct that implements the interface. Note that pointer to my struct is actually implementing the interface.
Is this the standart Go approach ? When do you create an interface ?
I have gotten feedback that we can do without the interface, or that there is no benefit having the New function and simply instantiate that struct as needed. How legitimate is this ?