Go Server SDK Usage
User Object
The user object is required for all methods. This is the basis of how segmentation and bucketing decisions are made.
The only required field in the user object is UserId. The rest are optional and are used by the system for user segmentation into Variables and Features.
See the UserData class in model_user_data.go for all accepted fields.
user := devcycle.User{
UserId: "example_user_id",
}
caution
Any number types passed into customData, privateCustomData or ClientCustomData must be a 64 bit wide type (int64, float64)
to avoid any potential issues with floating point error.
In addition to the properties you set on the devcycle.User yourself, these properties are automatically set by the SDK and are ready for segmentation:
| Property | Type | Description |
|---|---|---|
| platform | String | Platform/OS |
| platformVersion | String | Platform/OS Version |