Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit a6165d1

Browse files
author
Gabor Szabad
committed
Add $set_once operation
1 parent 6925d18 commit a6165d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mock.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ func (m *Mock) Update(distinctId string, u *Update) error {
104104
}
105105

106106
switch u.Operation {
107-
case "$set":
107+
case "$set", "$set_once":
108108
for key, val := range u.Properties {
109109
p.Properties[key] = val
110110
}
111111
default:
112-
return errors.New("mixpanel.Mock only supports the $set operation")
112+
return errors.New("mixpanel.Mock only supports the $set and $set_once operations")
113113
}
114114

115115
return nil

0 commit comments

Comments
 (0)