Skip to content

Commit 8e03c12

Browse files
author
Michael Ng
authored
chore: Prep 1.0.0-rc1 release. (#208)
1 parent 8a8fb7e commit 8e03c12

File tree

3 files changed

+29
-20
lines changed

3 files changed

+29
-20
lines changed

CHANGELOG.MD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
## [Unreleased]
88
Changes that have landed but are not yet released. Changes that have landed but are not yet released.
99

10+
## [1.0.0-rc1] - December 4th, 2019
11+
12+
## New Features
13+
- feat(PollingConfigManager): Implemented caching headers in PollingConfigManager. [#189](https://github.com/optimizely/go-sdk/pull/189)
14+
- feat(api): Add top-level wrapper for more convenient usage. [#191](https://github.com/optimizely/go-sdk/pull/191)
15+
16+
### Bug Fixes
17+
- fix(audience-evaluation): Fixed null-bubbling issues. [#177](https://github.com/optimizely/go-sdk/pull/177)
18+
- fix: correct error returned when SDK key is invalid [#203](https://github.com/optimizely/go-sdk/pull/203)
19+
- fix: Invalid datafile JSON should return an error [#205](https://github.com/optimizely/go-sdk/pull/205)
20+
1021
## [1.0.0-beta7] - November 14th, 2019
1122

1223
## New Features

README.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ module mymodule
2929
go 1.12
3030
3131
require (
32-
github.com/optimizely/go-sdk v1.0.0-beta7
32+
github.com/optimizely/go-sdk v1.0.0-rc1
3333
)
3434
```
3535

3636
If you are already using `go.mod` in your application you can run the following:
3737

3838
```
39-
go mod edit -require github.com/optimizely/[email protected]beta7
39+
go mod edit -require github.com/optimizely/[email protected]rc1
4040
```
4141

4242
NOTE:
@@ -55,38 +55,36 @@ will install it as a package to pkg directory, rather than src directory. It cou
5555
To start using the SDK, create an instance using our factory method:
5656

5757
```
58-
import "github.com/optimizely/go-sdk/pkg/client"
58+
import optly "github.com/optimizely/go-sdk"
59+
import "github.com/optimizely/go-sdk/client"
5960
60-
optimizelyFactory := &client.OptimizelyFactory{
61-
SDKKey: "[SDK_KEY_HERE]",
62-
}
61+
// Simple one-line initialization with the SDK key
62+
client, err := optly.Client("SDK_KEY")
6363
64-
client, err := optimizelyFactory.Client()
65-
66-
// You can also instantiate with a hard-coded datafile
64+
// You can also instantiate with a hard-coded datafile using our client factory method
6765
optimizelyFactory := &client.OptimizelyFactory{
6866
Datafile: []byte("datafile_string"),
6967
}
7068
71-
client, err := optimizelyFactory.Client()
69+
client, err = optimizelyFactory.Client()
7270
7371
```
7472

7573
### Feature Rollouts
7674
```
7775
import (
78-
"github.com/optimizely/go-sdk/pkg/client"
79-
"github.com/optimizely/go-sdk/pkg/entities"
76+
optly "github.com/optimizely/go-sdk"
8077
)
8178
82-
user := entities.UserContext{
83-
ID: "optimizely end user",
84-
Attributes: map[string]interface{}{
85-
"state": "California",
86-
"likes_donuts": true,
87-
},
88-
}
79+
// instantiate a client
80+
client, err := optly.Client("SDK_KEY")
8981
82+
// User attributes are optional and used for targeting and results segmentation
83+
atributes := map[string]interface{}{
84+
"state": "California",
85+
"likes_donuts": true,
86+
},
87+
user := optly.UserContext("optimizely end user", attributes)
9088
enabled, _ := client.IsFeatureEnabled("binary_feature", user)
9189
```
9290

pkg/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package pkg
1919

2020
// Version is the current version of the client
21-
const Version = "1.0.0-beta7"
21+
const Version = "1.0.0-rc1"
2222

2323
// ClientName is the name of the client
2424
const ClientName = "go-sdk"

0 commit comments

Comments
 (0)