If Config is supposed to be a parameter object, it should be named Params since the constructor is called New(...) and needs defined fx.In within.
If it is not meant to be an parameter object, I think passing Params into the constructor without defining that in the example is confusing.
Maybe we should be passing a Config instead? i.e. New(c Config)
I changed the example to use a parameter object, because I think using the parameter object makes sense here. I think if its not supposed to use a parameter object, updating the names of Params or Config to align could help make the example more clear.
The following example is confusing.
Config
is supposed to be a parameter object, it should be namedParams
since the constructor is calledNew(...)
and needs definedfx.In
within.Params
into the constructor without defining that in the example is confusing.Config
instead? i.e.New(c Config)
I changed the example to use a parameter object, because I think using the parameter object makes sense here. I think if its not supposed to use a parameter object, updating the names of
Params
orConfig
to align could help make the example more clear.