Skip to content

Commit 77ff117

Browse files
committed
chore: refine README
1 parent ebf731e commit 77ff117

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# FeatureProbe Server Side SDK for Rust
2+
23
[![Top Language](https://img.shields.io/github/languages/top/FeatureProbe/server-sdk-rust)](https://github.com/FeatureProbe/server-sdk-rust/search?l=rust)
34
[![codecov](https://codecov.io/gh/featureprobe/server-sdk-rust/branch/main/graph/badge.svg?token=TAN3AU4CK2)](https://codecov.io/gh/featureprobe/server-sdk-rust)
45
[![Github Star](https://img.shields.io/github/stars/FeatureProbe/server-sdk-rust)](https://github.com/FeatureProbe/server-sdk-rust/stargazers)
56
[![Apache-2.0 license](https://img.shields.io/github/license/FeatureProbe/FeatureProbe)](https://github.com/FeatureProbe/FeatureProbe/blob/main/LICENSE)
67

7-
88
Feature Probe is an open source feature management service. This SDK is used to control features in rust programs. This
99
SDK is designed primarily for use in multi-user systems such as web servers and applications.
1010

@@ -33,7 +33,7 @@ After you install and import the SDK, create a single, shared instance of the Fe
3333

3434
```rust
3535
fn main() {
36-
let remote_url = args.host_url + "/api/server/toggles";
36+
let remote_url = "http://localhost:4007";
3737

3838
let config = FPConfig {
3939
remote_url: remote_url.to_owned(),
@@ -56,7 +56,7 @@ fn main() {
5656

5757
You can use sdk to check which variation a particular user will receive for a given feature flag.
5858

59-
```
59+
```rust
6060
let user = FPUser::new("user@company.com").with("name", "bob");
6161
let show_feature = fp.bool_value("your.toggle.key", &user, false);
6262

@@ -67,17 +67,7 @@ if show_feature {
6767
}
6868
```
6969

70-
## Testing for sdk
71-
72-
We have unified integration tests for all our SDKs. Integration test cases are added as submodules for each SDK repo. So
73-
be sure to pull submodules first to get the latest integration tests before running tests.
74-
75-
```shell
76-
git pull --recurse-submodules
77-
cargo test
78-
```
79-
80-
## Testing for caller
70+
### Step 4. Unit Testing (Optional)
8171

8272
You could do unit testing for each variation:
8373

@@ -94,6 +84,16 @@ assert_eq!(fp.number_value("toggle_2", &u, 20.0), 12.5);
9484
assert_eq!(fp.string_value("toggle_3", &u, "val".to_owned()), "value");
9585
```
9686

87+
## Testing SDK
88+
89+
We have unified integration tests for all our SDKs. Integration test cases are added as submodules for each SDK repo. So
90+
be sure to pull submodules first to get the latest integration tests before running tests.
91+
92+
```shell
93+
git pull --recurse-submodules
94+
cargo test
95+
```
96+
9797
## Contributing
9898

9999
We are working on continue evolving FeatureProbe core, making it flexible and easier to use.

0 commit comments

Comments
 (0)