Skip to content

Commit

Permalink
docs(GOFF): update examples in the readme (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmathews authored Jan 13, 2025
1 parent 4077d5a commit f6bd743
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions providers/go-feature-flag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ This code block explain how you can create an `EvaluationContext` and use it to
```go
evaluationCtx := of.NewEvaluationContext(
"1d1b9238-2591-4a47-94cf-d2bc080892f1",
map[string]interface{}{
"firstname", "john",
"lastname", "doe",
"email", "john.doe@gofeatureflag.org",
"admin", true,
"anonymous", false,
})
adminFlag, _ := client.BoolValue(context.TODO(), "flag-only-for-admin", false, evaluationCtx)
"1d1b9238-2591-4a47-94cf-d2bc080892f1",
map[string]interface{}{
"firstname": "john",
"lastname": "doe",
"email": "john.doe@gofeatureflag.org",
"admin": true,
"anonymous": false,
})
adminFlag, _ := client.BooleanValue(context.TODO(), "flag-only-for-admin", false, evaluationCtx)
if adminFlag {
// flag "flag-only-for-admin" is true for the user
} else {
Expand Down

0 comments on commit f6bd743

Please sign in to comment.