-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme, changelog & license year
- Loading branch information
1 parent
c270819
commit 19b4c18
Showing
3 changed files
with
67 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,20 +16,23 @@ Refer to the [Go SDK's developer documentation](https://docs.developers.optimize | |
|
||
### Requirements | ||
|
||
Requires Golang version 1.19 or higher. | ||
Requires Golang version: | ||
|
||
- For v2: 1.21.0 or higher | ||
- For < v2: 1.12 or higher | ||
|
||
### Install the SDK | ||
|
||
#### Install from github: | ||
|
||
```$sh | ||
go get github.com/optimizely/go-sdk | ||
go get github.com/optimizely/go-sdk/v2 | ||
``` | ||
|
||
#### Install from source: | ||
```$sh | ||
go get github.com/optimizely/go-sdk | ||
cd $GOPATH/src/github.com/optimizely/go-sdk | ||
go get github.com/optimizely/go-sdk/v2 | ||
cd $GOPATH/src/github.com/optimizely/go-sdk/v2 | ||
go install | ||
``` | ||
|
||
|
@@ -44,23 +47,23 @@ module mymodule | |
go 1.21.0 | ||
require ( | ||
github.com/optimizely/go-sdk v2.0.0-beta | ||
github.com/optimizely/go-sdk/v2 v2.0.0 | ||
) | ||
``` | ||
|
||
If you are already using `go.mod` in your application you can run the following: | ||
|
||
``` | ||
go mod edit -require github.com/optimizely/[email protected]-beta | ||
go mod edit -require github.com/optimizely/go-sdk/v2@v2.0.0 | ||
``` | ||
|
||
NOTE: | ||
```$sh | ||
go get github.com/optimizely/go-sdk/... | ||
go get github.com/optimizely/go-sdk/v2/... | ||
``` | ||
or | ||
```$sh | ||
go get github.com/optimizely/go-sdk/pkg | ||
go get github.com/optimizely/go-sdk/v2/pkg | ||
``` | ||
will install it as a package to pkg directory, rather than src directory. It could be useful for future development and vendoring. | ||
|
||
|
@@ -72,8 +75,8 @@ See the example file in examples/main.go. | |
### Initialization | ||
|
||
``` | ||
import optly "github.com/optimizely/go-sdk" | ||
import "github.com/optimizely/go-sdk/client" | ||
import optly "github.com/optimizely/go-sdk/v2" | ||
import "github.com/optimizely/go-sdk/v2/client" | ||
// Simple one-line initialization with the SDK key | ||
optlyClient, err := optly.Client("SDK_KEY") | ||
|
@@ -87,7 +90,7 @@ optlyClient, err = optimizelyFactory.Client() | |
### Make Decisions | ||
``` | ||
import ( | ||
optly "github.com/optimizely/go-sdk" | ||
optly "github.com/optimizely/go-sdk/v2" | ||
) | ||
// instantiate a client | ||
|
@@ -161,6 +164,10 @@ sync | |
Copyright (c) 2009 The Go Authors. All rights reserved. | ||
https://github.com/golang/sync/blob/master/LICENSE | ||
|
||
opentelemetry-go | ||
Copyright The OpenTelemetry Authors | ||
License (Apache-2.0): https://github.com/open-telemetry/opentelemetry-go/blob/main/LICENSE | ||
|
||
### Other Optimizely SDKs | ||
|
||
- Agent - https://github.com/optimizely/agent | ||
|