diff --git a/go.mod b/go.mod index f32db2d..cd4331f 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/go.sum b/go.sum index c24f40e..907f417 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/splitio/client/client.go b/splitio/client/client.go index 664ac14..7916f86 100644 --- a/splitio/client/client.go +++ b/splitio/client/client.go @@ -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. @@ -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 {