Skip to content

Commit edd837b

Browse files
docs: fix order of parameters for assignment functions (#45)
* docs: fix order of parameters for assignment functions * Update README.md --------- Co-authored-by: Leo Romanovsky <[email protected]>
1 parent 121cf0a commit edd837b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ import (
6666
var eppoClient = &eppoclient.EppoClient{}
6767

6868
variation := eppoClient.GetStringAssignment(
69-
'new-user-onboarding',
70-
user.id,
71-
user.attributes,
69+
user.id,
70+
'new-user-onboarding',
71+
user.attributes,
7272
'control'
7373
);
7474
```
7575

7676
## Assignment functions
7777

78-
Every Eppo flag has a return type that is set once on creation in the dashboard. Once a flag is created, assignments in code should be made using the corresponding typed function:
78+
Every Eppo flag has a return type that is set once on creation in the dashboard. Once a flag is created, assignments in code should be made using the corresponding typed function:
7979

8080
```go
8181
GetBooleanAssignment(...)
@@ -89,14 +89,14 @@ Each function has the same signature, but returns the type in the function name.
8989

9090
```go
9191
func getBooleanAssignment(
92-
flagKey string,
93-
subjectKey string,
94-
subjectAttributes map[string]interface{},
92+
subjectKey string,
93+
flagKey string,
94+
subjectAttributes SubjectAttributes,
9595
defaultValue string
9696
) bool
9797
```
9898

99-
## Assignment logger
99+
## Assignment logger
100100

101101
If you are using the Eppo SDK for experiment assignment (i.e randomization), pass in a callback logging function to the `InitClient` function on SDK initialization. The SDK invokes the callback to capture assignment data whenever a variation is assigned.
102102

0 commit comments

Comments
 (0)