Skip to content

Commit 3b6b8c4

Browse files
add GetAssignment method back for backwards compatibility (#25)
1 parent 476a5bb commit 3b6b8c4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

eppoclient/client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ func newEppoClient(configRequestor iConfigRequestor, assignmentLogger IAssignmen
2828
return ec
2929
}
3030

31+
// GetAssignment is maintained for backwards capability. It will return a string value for the assignment.
32+
func (ec *EppoClient) GetAssignment(subjectKey string, flagKey string, subjectAttributes dictionary) (string, error) {
33+
return ec.GetStringAssignment(subjectKey, flagKey, subjectAttributes)
34+
}
35+
3136
func (ec *EppoClient) GetBoolAssignment(subjectKey string, flagKey string, subjectAttributes dictionary) (bool, error) {
3237
variation, err := ec.getAssignment(subjectKey, flagKey, subjectAttributes, BoolType)
3338
return variation.boolValue, err

0 commit comments

Comments
 (0)