Go

The Go SDK to interact with Progressively

Installation

$ go get github.com/progressively-crew/sdk-go@latest

Usage

Create an SDK (Build method)

sdk := progressively.SdkBuilder("valid-sdk-key", "BACKEND_URL").Build()

AddField

Fields is an option that allows passing data about your users to create targeting strategies. For instance, you can set an email field, and in Progressively's dashboard, you can create a rule that only targets people that use an expected domain:

sdk := progressively.SdkBuilder("valid-sdk-key", "BACKEND_URL").AddField("email", "marvin.frachet@something.com").Build()

Evaluate

varValue := sdk.Evaluate("theFlagKey")

LoadFlags

sdk.LoadFlags()

Last updated