Skip to content

Commit b804ea6

Browse files
author
tjj5036
committed
Updates the README with basic usage and modifies the example accordingly
1 parent c763ba3 commit b804ea6

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,22 @@
22

33
Optimizely Server Side SDK.... in Go.
44

5-
## Installation
5+
## Installation / Basic Usage
6+
7+
TL;DR: just `yy` and `p` from the `examples` directory.
68

79
1. Install the Optimizely Go SDK with `go get`:
810

911
go get github.com/optimizely/go-sdk
12+
13+
2. Import the Optimizely SDK:
14+
15+
import optimizely "github.com/optimizely/go-sdk/optimizely"
16+
17+
3. Create a new `OptimizelyClient` object with your Account ID:
18+
19+
optimizely_client , err := optimizely.GetOptimizelyClient(OPTIMIZELY_ACCOUNT_ID)
20+
21+
4. Do something cool with the Optimizely client!
22+
23+
optimizely_client.Track(.....)

examples/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package main
22

33
import (
44
"fmt"
5-
"github.com/optimizely/go-sdk/optimizely"
65
)
76

7+
import optimizely "github.com/optimizely/go-sdk/optimizely"
8+
89
func main() {
910
OPTIMIZELY_ACCOUNT_ID := "12345"
1011
_, err := optimizely.GetOptimizelyClient(OPTIMIZELY_ACCOUNT_ID)

0 commit comments

Comments
 (0)