Conversation
Exports `internal/config.Modifier` in `alias.go` so that dependency injection and mocking tools can do a slightly better type-check than `any`. Issue #456 Signed-off-by: Jay Pipes <jaypipes@gmail.com>
|
exporting the Modifer LGTM but I concur we should understand the usecase and the pain of the current API better before to merge this PR. |
|
I jumped in the discussion since I opened the issue. IMHO, in general, I would avoid exposing a function and put its parameter type in With that being said, it's true that the function is practically using Just my 0.02$ |
@pastequo unfortunately, we can't avoid the use of Adding |
|
I could argue that you are not strictly backward compatible anyway (at least between 0.16.0 & 0.23.0, I haven't looked into the details) because
Also another argument "against" the backward compatibility is that it might have worked for 1 option (like You are still on major 0, so you can take advantage of that. I think I would have prefer either several Regarding the mock thing, I think it's a limitation of gomock, gwh.Modifer is a function, gomock can't match on them |
Sorry, @pastequo. This commit was the one that broke backwards compatibility. :(
|
Exports
internal/config.Modifierinalias.goso that dependency injection and mocking tools can do a slightly better type-check thanany.Issue #456