An unoffical Go client for GroundControl
go get github.com/robherley/groundcontrol-go
client := groundcontrol.New("<project>", "<apikey>")
// check globally enabled
client.IsFeatureFlagEnabled(ctx, "my-feature-flag")
// check enablement for single actor
client.IsFeatureFlagEnabled(ctx, "my-feature-flag", groundcontrol.Actor("alice"))
// or multiple actors
client.IsFeatureFlagEnabled(ctx, "my-feature-flag", groundcontrol.Actor("alice"), groundcontrol.Actor("bob"))Sets the base URL of the client:
client := groundcontrol.New("<project>", "<apikey>", groundcontrol.WithBaseURL("http://localhost:8080"))Sets the underlying net/http.Client:
// e.g. hashicorp/go-retryablehttp
retryClient := retryablehttp.NewClient().StandardClient()
client := groundcontrol.New("<project>", "<apikey>", groundcontrol.WithHTTPClient(retryClient))