Skip to content

Commit 012f657

Browse files
authored
Add README so that package info on pkg.go.dev will be shown more nicely (#11)
* Add README so that package info on pkg.go.dev will be shown more nicely * Update README.md
1 parent ec3ee7d commit 012f657

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

README.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
11
# Eppo SDK for Golang
22

3-
## Building
3+
Eppoclient is a client sdk for `eppo.cloud` randomization API.
4+
It is used to retrieve the experiments data and put it to in-memory cache, and then get assignments information.
45

5-
```
6-
make build
7-
```
6+
## Getting Started
7+
8+
Refer to our [SDK documentation](https://docs.geteppo.com/prerequisites/feature-flagging/randomization-sdk/) for how to install and use the SDK.
9+
10+
## Supported Python Versions
11+
This version of the SDK is compatible with Python 3.6 and above.
12+
13+
## Example
814

9-
## Running tests
1015

1116
```
12-
make test
17+
import (
18+
"github.com/Eppo-exp/golang-sdk/eppoclient"
19+
)
20+
21+
var eppoClient = &eppoclient.EppoClient{}
22+
23+
func main() {
24+
eppoClient = eppoclient.InitClient(eppoclient.Config{
25+
ApiKey: "<your_api_key>",
26+
BaseUrl: "<base_url>", // optional, default https://eppo.cloud/api
27+
AssignmentLogger: eppoclient.AssignmentLogger{},
28+
})
29+
}
30+
31+
func someBLFunc() {
32+
assignment, _ := eppoClient.GetAssignment("subject-1", "experiment_5", sbjAttrs)
33+
34+
if assigment == "control" {
35+
// do something
36+
}
37+
}
1338
```

0 commit comments

Comments
 (0)