Skip to content

Commit

Permalink
Pr suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
nmayorsplit committed Nov 14, 2023
1 parent e65392a commit 024222f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/splitio/go-client/v6
go 1.18

require (
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231114140907-c89079357dca
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231114174555-e7fa17527a05
github.com/splitio/go-toolkit/v5 v5.3.2-0.20231106173125-49e72b9823dc
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/redis/go-redis/v9 v9.0.4 h1:FC82T+CHJ/Q/PdyLW++GeCO+Ol59Y4T7R4jbgjvktgc=
github.com/redis/go-redis/v9 v9.0.4/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231114140907-c89079357dca h1:fWhN3KBkAO4FUFcvVX87MdShbiynf6IlgddAunuZul4=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231114140907-c89079357dca/go.mod h1:PSkBLDXQW7NAhZ7JO1va7QJyTeDvpE7MEDnTdn5evRM=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231114174555-e7fa17527a05 h1:rDWd6xVhU/XCmWH28+8CnWkJOZ+8yoKxm2+rbX3HahI=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231114174555-e7fa17527a05/go.mod h1:PSkBLDXQW7NAhZ7JO1va7QJyTeDvpE7MEDnTdn5evRM=
github.com/splitio/go-toolkit/v5 v5.3.2-0.20231106173125-49e72b9823dc h1:14jdJE/rBEYfs1CO8kOQrj/8azszRFU4yw5FQIGpoJg=
github.com/splitio/go-toolkit/v5 v5.3.2-0.20231106173125-49e72b9823dc/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg=
Expand Down
14 changes: 9 additions & 5 deletions splitio/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const (
treatmentsByFlagSets = "TreatmentsByFlahSets"
treatmentWithConfig = "TreatmentWithConfig"
treatmentsWithConfig = "TreatmentsWithConfig"
treatmentsWithConfigByFlagSet = "TreatmentWithConfigByFlagSet"
treatmentsWithConfigByFlagSets = "TrearmenteWithConfigByFlagSets"
treatmentsWithConfigByFlagSet = "TreatmentsWithConfigByFlagSet"
treatmentsWithConfigByFlagSets = "TrearmentsWithConfigByFlagSets"
)

// SplitClient is the entry-point of the split SDK.
Expand Down Expand Up @@ -326,9 +326,13 @@ func (c *SplitClient) validateSets(sets []string) []string {
c.logger.Warning("sets must be a non-empty array")
return nil
}
sets, err := flagsets.SanitizeMany(sets)
if err != nil {
return nil
sets, errs := flagsets.SanitizeMany(sets)
if len(errs) != 0 {
for _, err := range errs {
if errType, ok := err.(*dtos.FlagSetValidatonError); ok {
c.logger.Warning(errType.Message)
}
}
}
sets = c.filterSetsAreInConfig(sets)
if len(sets) == 0 {
Expand Down

0 comments on commit 024222f

Please sign in to comment.