FeatureProbe Server Side SDK for Golang (Alpha Version)
This is alpha version and should not be considered ready for production use while this message is visible.
Feature Probe is an open source feature management service. This SDK is used to control features in Golang programs. This
SDK is designed primarily for use in multi-user systems such as web servers and applications.
Basic Terms
Reading the short Basic Terms will help to understand the code blow more easily. 中文
Try Out Demo Code
We provide a runnable demo code for you to understand how FeatureProbe SDK is used.
Start FeatureProbe Service with docker composer. How to
Download this repo and run the demo program:
git clone https://github.com/FeatureProbe/server-sdk-go.git
cd server-sdk-go
go run example/main.go
Find the Demo code in example,
do some change and run the program again.
go run main.go
Step-by-Step Guide
In this guide we explain how to use feature toggles in a Golang application using FeatureProbe.
Step 1. Install the Golang SDK
Fisrt import the FeatureProbe SDK in your application code:
import "github.com/featureprobe/server-sdk-go"
Fetch the FeatureProbe SDK as a dependency in go.mod.
go get github.com/featureprobe/server-sdk-go
Step 2. Create a FeatureProbe instance
After you install and import the SDK, create a single, shared instance of the FeatureProbe sdk.
We have unified integration tests for all our SDKs. Integration test cases are added as submodules for each SDK repo. So
be sure to pull submodules first to get the latest integration tests before running tests.
We are working on continue evolving FeatureProbe core, making it flexible and easier to use.
Development of FeatureProbe happens in the open on GitHub, and we are grateful to the
community for contributing bugfixes and improvements.
Please read CONTRIBUTING
for details on our code of conduct, and the process for taking part in improving FeatureProbe.
FeatureProbe Server Side SDK for Golang (Alpha Version)
This is alpha version and should not be considered ready for production use while this message is visible.
Feature Probe is an open source feature management service. This SDK is used to control features in Golang programs. This SDK is designed primarily for use in multi-user systems such as web servers and applications.
Basic Terms
Reading the short Basic Terms will help to understand the code blow more easily. 中文
Try Out Demo Code
We provide a runnable demo code for you to understand how FeatureProbe SDK is used.
Step-by-Step Guide
In this guide we explain how to use feature toggles in a Golang application using FeatureProbe.
Step 1. Install the Golang SDK
Fisrt import the FeatureProbe SDK in your application code:
Fetch the FeatureProbe SDK as a dependency in
go.mod
.Step 2. Create a FeatureProbe instance
After you install and import the SDK, create a single, shared instance of the FeatureProbe sdk.
Step 3. Use the feature toggle
You can use sdk to check which variation a particular user will receive for a given feature flag.
Step 4. Unit Testing (Optional)
Testing SDK
We have unified integration tests for all our SDKs. Integration test cases are added as submodules for each SDK repo. So be sure to pull submodules first to get the latest integration tests before running tests.
Golang Docs
Doc home
Main functions
Contributing
We are working on continue evolving FeatureProbe core, making it flexible and easier to use. Development of FeatureProbe happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements.
Please read CONTRIBUTING for details on our code of conduct, and the process for taking part in improving FeatureProbe.