Skip to content

Commit

Permalink
docs: update readme to be included in the docs
Browse files Browse the repository at this point in the history
Fix build issue on openfeature.dev in Netlify.

> Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc

Signed-off-by: Michael Beemer <[email protected]>
  • Loading branch information
beeme1mr authored Oct 28, 2024
1 parent 7850eec commit 13444e7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ programLevel.Set(slog.LevelDebug)
h := slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{Level: programLevel})
slog.SetDefault(slog.New(h))

// add a hook globally, to run on all evaluations
// add a hook globally to run on all evaluations
hook, err := NewLoggingHook(false)
if err != nil {
// handle error
Expand All @@ -204,13 +204,17 @@ client.BooleanValueDetails(context.Background(), "not-exist", true, openfeature.
```

###### Output
> {"time":"2024-10-23T13:33:09.8870867+03:00","level":"DEBUG","msg":"Before stage","domain":"test-client","provider_name":"InMemoryProvider","flag_key":"not-exist","default_value":true}

```sh
{"time":"2024-10-23T13:33:09.8870867+03:00","level":"DEBUG","msg":"Before stage","domain":"test-client","provider_name":"InMemoryProvider","flag_key":"not-exist","default_value":true}
{"time":"2024-10-23T13:33:09.8968242+03:00","level":"ERROR","msg":"Error stage","domain":"test-client","provider_name":"InMemoryProvider","flag_key":"not-exist","default_value":true,"error_message":"error code: FLAG_NOT_FOUND: flag for key not-exist not found"}
```

See [hooks](#hooks) for more information on configuring hooks.

### Domains
Clients can be assigned to a domain. A domain is a logical identifier which can be used to associate clients with a particular provider. If a domain has no associated provider, the default provider is used.

Clients can be assigned to a domain. A domain is a logical identifier that can be used to associate clients with a particular provider. If a domain has no associated provider, the default provider is used.

```go
import "github.com/open-feature/go-sdk/openfeature"
Expand All @@ -226,7 +230,6 @@ clientWithDefault := openfeature.NewClient("")
clientForCache := openfeature.NewClient("clientForCache")
```


### Eventing

Events allow you to react to state changes in the provider or underlying flag management system, such as flag definition changes, provider readiness, or error conditions.
Expand Down

0 comments on commit 13444e7

Please sign in to comment.