Skip to content

Commit

Permalink
update readme usage
Browse files Browse the repository at this point in the history
Signed-off-by: liran2000 <[email protected]>
  • Loading branch information
liran2000 committed Oct 21, 2024
1 parent ca8d76a commit 476c0bf
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions providers/multiprovider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ an error result.
### User Defined

Rather than making assumptions about when to use a provider’s result and when not to (which may not hold across all
providers) there is also a way for the user to define their own strategy that determines whether or not to use a result
providers) there is also a way for the user to define their own strategy that determines whether to use a result
or fall through to the next one.

## Installation
Expand Down Expand Up @@ -88,13 +88,7 @@ MultiProvider multiProvider = new MultiProvider(providers);
OpenFeatureAPI.getInstance().setProviderAndWait(multiProvider);
// initialize using a different strategy
// notice LinkedHashMap is used, since order is important
Map<String, FeatureProvider> providersMap = new LinkedHashMap<>(2);
providersMap.put(provider1.getMetadata().getName(), provider1);
providersMap.put(provider2.getMetadata().getName(), provider2);
multiProvider = new MultiProvider(providers, new FirstSuccessfulStrategy(providersMap));
multiProvider = new MultiProvider(providers, new FirstSuccessfulStrategy());
...
```

Expand Down

0 comments on commit 476c0bf

Please sign in to comment.