open-feature / go-sdk-contrib

Community maintained OpenFeature Providers and Hooks for Go
https://openfeature.dev
Apache License 2.0
42 stars 38 forks source link

fix: use narrow local LDClient interface, not *LDClient struct #532

Closed zellyn closed 1 month ago

zellyn commented 2 months ago

It's often advantageous or necessary to wrap an LDClient, which doesn't work if the provider code accepts a raw *ld.LDClient.

Signed-off-by: Zellyn Hunter zellyn@gmail.com

This PR

Use a narrow local LDClient interface instead of *ld.LDClient to refer to the wrapped LaunchDarkly client.

Related Issues

n/a

Notes

n/a

Follow-up Tasks

n/a

How to test

n/a — existing tests are sufficient

zellyn commented 2 months ago

@kinyoklion ptal — I defined a narrow LDClient interface.

Kavindu-Dodan commented 1 month ago

Merging with current approvals :)