LaunchDarkly Sample Go Application
We've built a simple console application that demonstrates how LaunchDarkly's SDK works.
This demo requires Go 1.14 or higher.
main.goand set the value of
sdkKeyto your LaunchDarkly SDK key. If there is an existing boolean feature flag in your LaunchDarkly project that you want to evaluate, set
featureFlagKeyto the flag key.
const sdkKey = "1234567890abcdef" const featureFlagKey = "my-flag"
On the command line, run
You should see the message
"Feature flag '<flag key>' is <true/false> for this user".