The v2
branch currently contains prerelease code to support development of Go SDK 5.0.0. For the source code of the latest release that is used by Go SDK 4.x, see the v1
branch.
This repository contains packages and types that are shared between the LaunchDarkly Go SDK and other LaunchDarkly Go components.
Applications using the LaunchDarkly Go SDK will generally use the lduser
subpackage, which contains the User
type, and may also use the ldvalue
package, which contains the Value
type that represents arbitrary JSON values. Other packages are less frequently used.
Note that the base import path is gopkg.in/launchdarkly/go-sdk-common.v2
, not github.com/launchdarkly/go-sdk-common
. This ensures that the package can be referenced not only as a Go module, but also by projects that use older tools like dep
and govendor
, because the 5.x release of the Go SDK supports either module or non-module usage. Future releases of this package, and of the Go SDK, may drop support for non-module usage.
Also, unlike go-server-sdk
this does not have server
in the name, because nothing in this repository is specific to the LaunchDarkly server-side model; it could be used in a client-side context.
This version of the project has been tested with Go 1.13 through 1.14.
Check out our documentation for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the complete reference guide for the Go SDK, or the generated API documentation for this project.
We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this SDK.
- LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
- Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
- Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
- Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
- Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out our documentation for a complete list.
- Explore LaunchDarkly
- launchdarkly.com for more information
- docs.launchdarkly.com for our documentation and SDK reference guides
- apidocs.launchdarkly.com for our API documentation
- blog.launchdarkly.com for the latest product updates
- Feature Flagging Guide for best practices and strategies