You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was a bit puzzeled when I first saw the function signature. I am quite familiar with the options pattern. But I have no idea how I am supposed to use this here? Was this commited by accident?
Because as a user of the library I don't have any options to set. I need to use the setter methods anyways. Such as SetLibDir(string).
Was it somehow thought to be used in the future or was it simply forgotten to be deleted?
The text was updated successfully, but these errors were encountered:
becheran
changed the title
Why is there a functional pattern constructore? I don't see any way of using it?
Why is there a functional pattern constructore for the installer?
Feb 2, 2024
Yeah, it's a good question. I definitely can't remember why it was done that way, but I can see how it could be useful for an internal package. It's plausible it was initially not meant to be part of the public API.
One likely time it deviated was when I discovered that I couldn't have any CGO dependencies alongside the installer package (anything that depends on the native code by definition needs the C library to be loaded, so you can't also have code in that package that checks that it's loaded, what version it is etc.).
So a refactor may have happened which essentially made a version of this redundant. As it's in the public API now I can't remove it.
I'll close it for now, but we can re-open if there are suggestions to improve it.
pact-go/installer/installer.go
Line 43 in 83d7e0c
I was a bit puzzeled when I first saw the function signature. I am quite familiar with the options pattern. But I have no idea how I am supposed to use this here? Was this commited by accident?
Because as a user of the library I don't have any options to set. I need to use the setter methods anyways. Such as
SetLibDir(string)
.Was it somehow thought to be used in the future or was it simply forgotten to be deleted?
The text was updated successfully, but these errors were encountered: