-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add interface to EvaluationClient (Go) #700
Comments
I'm sure there exist Go client libraries that expose a matching interface out there. So take what I am saying next here with a grain of salt, it has a heavy dose of personal preference. If doing this saves people time and doesn't paint any other endeavours into a corner, then I say go for it! That said, I can't think of many clients publishing a large interface that is identical to the struct that implements it. Moreover, depending on an external interface tied to an entire clients surface area, means that as that surface grows, so must the rest of the implementations. What I describe here (more smaller interface) does lead to a bit of a proliferation of smaller mocks / spies / mimics everywhere and is less DRY. |
I support @GeorgeMac words. I think the |
Discussed in https://github.com/orgs/flipt-io/discussions/3886
Originally posted by zeryel February 7, 2025
Greetings. I want to start using Flipt, and I noticed that current SDK (Go) haven't interface for EvaluationClient - which makes it very difficult to write unit tests.
I suggest implementing the EvaluationClient's interface in SDK, i.e.:
The text was updated successfully, but these errors were encountered: