open-feature / open-feature/go-sdk

Remove the `GetApiInstance` function

Open
#414 3 comments 0 reactions 0 assignees View on GitHub
v2
Dominant language
Go
Stars
249
Forks
61
Avg merge
2d 10h
Merged PRs (30d)
20

Description

> Remove the GetApiInstance function. Exposing the fact that the API is a singleton to users does not make sense. That is an internal implementation detail that users do not need to be aware about. It is also very clunky to have users do `openfeature.GetApiInstance().GetClient()`. Instead, have the user do `openfeature.NewClient()`.

Remove `openfeature.GetApiInstance().GetClient()` and only export `openfeature.NewClient()`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.