Skip to content

Commit 515f38b

Browse files
authored
docs: remove golang snippet and fix variable name (open-feature#964)
Signed-off-by: Michael Beemer <[email protected]>
1 parent b3ba6fe commit 515f38b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
- Java 8+ (compiler target is 1.8)
5050

51-
Note that this library is intended to be used in server-side contexts and has not been evaluated for use in mobile devices.
51+
Note that this library is intended to be used in server-side contexts and has not been evaluated for use on mobile devices.
5252

5353
### Install
5454

@@ -282,15 +282,15 @@ To register a `ThreadLocal` context propagator, you can use the `setTransactionC
282282
// registering the ThreadLocalTransactionContextPropagator
283283
OpenFeatureAPI.getInstance().setTransactionContextPropagator(new ThreadLocalTransactionContextPropagator());
284284
```
285-
Once you've registered a transaction context propagator, you can propagate the data into request scoped transaction context.
285+
Once you've registered a transaction context propagator, you can propagate the data into request-scoped transaction context.
286286

287287
```java
288288
// adding userId to transaction context
289289
OpenFeatureAPI api = OpenFeatureAPI.getInstance();
290290
Map<String, Value> transactionAttrs = new HashMap<>();
291291
transactionAttrs.put("userId", new Value("userId"));
292292
EvaluationContext transactionCtx = new ImmutableContext(transactionAttrs);
293-
api.setTransactionContext(apiCtx);
293+
api.setTransactionContext(transactionCtx);
294294
```
295295
Additionally, you can develop a custom transaction context propagator by implementing the `TransactionContextPropagator` interface and registering it as shown above.
296296

@@ -390,8 +390,6 @@ class MyEventProvider extends EventProvider {
390390
To develop a hook, you need to create a new project and include the OpenFeature SDK as a dependency.
391391
This can be a new repository or included in [the existing contrib repository](https://github.com/open-feature/java-sdk-contrib) available under the OpenFeature organization.
392392
Implement your own hook by conforming to the `Hook interface`.
393-
To satisfy the interface, all methods (`Before`/`After`/`Finally`/`Error`) need to be defined.
394-
To avoid defining empty functions make use of the `UnimplementedHook` struct (which already implements all the empty functions).
395393

396394
```java
397395
class MyHook implements Hook {
@@ -434,7 +432,7 @@ class MyHook implements Hook {
434432

435433
Interested in contributing? Great, we'd love your help! To get started, take a look at the [CONTRIBUTING](CONTRIBUTING.md) guide.
436434

437-
### Thanks to everyone that has already contributed
435+
### Thanks to everyone who has already contributed
438436

439437
<a href="https://github.com/open-feature/java-sdk/graphs/contributors">
440438
<img src="https://contrib.rocks/image?repo=open-feature/java-sdk" alt="Pictures of the folks who have contributed to the project" />

0 commit comments

Comments
 (0)