Skip to content

Commit 6ed446e

Browse files
committed
Merge branch 'main' of github.com:splitio/go-client
2 parents 877c5a6 + 1178dcf commit 6ed446e

20 files changed

+710
-109
lines changed

.github/dependabot.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
version: 2
3+
4+
updates:
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
reviewers:
10+
- "splitio/sdk"

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
- 6379:6379
2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
2525

2626
- name: Set up Go version
27-
uses: actions/setup-go@v4
27+
uses: actions/setup-go@v5
2828
with:
2929
go-version: '1.18.0'
3030

.github/workflows/update-license-year.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919

@@ -24,7 +24,7 @@ jobs:
2424
run: "echo PREVIOUS=$(($CURRENT-1)) >> $GITHUB_ENV"
2525

2626
- name: Update LICENSE
27-
uses: jacobtomlinson/gha-find-replace@v2
27+
uses: jacobtomlinson/gha-find-replace@v3
2828
with:
2929
find: ${{ env.PREVIOUS }}
3030
replace: ${{ env.CURRENT }}
@@ -38,7 +38,7 @@ jobs:
3838
git commit -m "Updated License Year" -a
3939
4040
- name: Create Pull Request
41-
uses: peter-evans/create-pull-request@v3
41+
uses: peter-evans/create-pull-request@v6
4242
with:
4343
token: ${{ secrets.GITHUB_TOKEN }}
4444
title: Update License Year

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
6.6.0 (May 14, 2024)
2+
- Updated go-split-commons to v6
3+
- Added support for targeting rules based on semantic versions (https://semver.org/).
4+
- Added the logic to handle correctly when the SDK receives an unsupported Matcher type.
5+
16
6.5.2 (Dec 21, 2023)
27
- Updated telemetry name methods for flagSets.
38

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module github.com/splitio/go-client/v6
33
go 1.18
44

55
require (
6-
github.com/splitio/go-split-commons/v5 v5.1.1
7-
github.com/splitio/go-toolkit/v5 v5.3.2
6+
github.com/splitio/go-split-commons/v6 v6.0.0
7+
github.com/splitio/go-toolkit/v5 v5.4.0
88
)
99

1010
require (

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
1010
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
1111
github.com/redis/go-redis/v9 v9.0.4 h1:FC82T+CHJ/Q/PdyLW++GeCO+Ol59Y4T7R4jbgjvktgc=
1212
github.com/redis/go-redis/v9 v9.0.4/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk=
13-
github.com/splitio/go-split-commons/v5 v5.1.1 h1:lLOqNQMdZA5Z7FBBh4YODWdE2QFgxSPMptX9ty14x4c=
14-
github.com/splitio/go-split-commons/v5 v5.1.1/go.mod h1:9vAZrlhKvhensyRC11hyVFdgLIBrkX9D5vdYc9qB13w=
15-
github.com/splitio/go-toolkit/v5 v5.3.2 h1:Yy9YBcHRmK5WVZjeA/klLGEdF38xpsL1ejnC3ro8a2M=
16-
github.com/splitio/go-toolkit/v5 v5.3.2/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
13+
github.com/splitio/go-split-commons/v6 v6.0.0 h1:qenr5qbXafjvM832C64CVpjtlShuQiWCwtR5I2h4ogM=
14+
github.com/splitio/go-split-commons/v6 v6.0.0/go.mod h1:TsvIh3XP7yjc7ly4vpj06AkoBND36SodPs5qfhb8rHc=
15+
github.com/splitio/go-toolkit/v5 v5.4.0 h1:g5WFpRhQomnXCmvfsNOWV4s5AuUrWIZ+amM68G8NBKM=
16+
github.com/splitio/go-toolkit/v5 v5.4.0/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
1717
github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg=
1818
github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
1919
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=

splitio/client/client.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import (
1010
"github.com/splitio/go-client/v6/splitio/conf"
1111
impressionlistener "github.com/splitio/go-client/v6/splitio/impressionListener"
1212

13-
"github.com/splitio/go-split-commons/v5/dtos"
14-
"github.com/splitio/go-split-commons/v5/engine/evaluator"
15-
"github.com/splitio/go-split-commons/v5/engine/evaluator/impressionlabels"
16-
"github.com/splitio/go-split-commons/v5/flagsets"
17-
"github.com/splitio/go-split-commons/v5/provisional"
18-
"github.com/splitio/go-split-commons/v5/storage"
19-
"github.com/splitio/go-split-commons/v5/telemetry"
13+
"github.com/splitio/go-split-commons/v6/dtos"
14+
"github.com/splitio/go-split-commons/v6/engine/evaluator"
15+
"github.com/splitio/go-split-commons/v6/engine/evaluator/impressionlabels"
16+
"github.com/splitio/go-split-commons/v6/flagsets"
17+
"github.com/splitio/go-split-commons/v6/provisional"
18+
"github.com/splitio/go-split-commons/v6/storage"
19+
"github.com/splitio/go-split-commons/v6/telemetry"
2020
"github.com/splitio/go-toolkit/v5/logging"
2121
)
2222

@@ -241,8 +241,6 @@ func (c *SplitClient) processResult(result evaluator.Results, operation string,
241241

242242
// doTreatmentsCall retrieves treatments of an specific array of feature flag names with configurations object if it is present for a certain key and set of attributes
243243
func (c *SplitClient) doTreatmentsCall(key interface{}, featureFlagNames []string, attributes map[string]interface{}, operation string, metricsLabel string) (t map[string]TreatmentResult) {
244-
treatments := make(map[string]TreatmentResult)
245-
246244
// Set up a guard deferred function to recover if the SDK starts panicking
247245
defer func() {
248246
if r := recover(); r != nil {
@@ -275,9 +273,7 @@ func (c *SplitClient) doTreatmentsCall(key interface{}, featureFlagNames []strin
275273

276274
evaluationsResult := c.getEvaluationsResult(matchingKey, bucketingKey, filteredFeatures, attributes, operation)
277275

278-
treatments = c.processResult(evaluationsResult, operation, bucketingKey, matchingKey, attributes, metricsLabel)
279-
280-
return treatments
276+
return c.processResult(evaluationsResult, operation, bucketingKey, matchingKey, attributes, metricsLabel)
281277
}
282278

283279
// doTreatmentsCallByFlagSets retrieves treatments of a specific array of feature flag names, that belong to flag sets, with configurations object if it is present for a certain key and set of attributes

0 commit comments

Comments
 (0)