From 49552e0caffc9d2720c70fde93a4f9ebdc15315e Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Wed, 1 Mar 2023 13:40:46 -0800 Subject: [PATCH] fix: element name -> element value --- momento/requester.go | 4 ++-- momento/sorted_set_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/momento/requester.go b/momento/requester.go index 7229136d..3b0bb7aa 100644 --- a/momento/requester.go +++ b/momento/requester.go @@ -87,13 +87,13 @@ func prepareName(name string, label string) (string, error) { func prepareElementValue(name Value) ([]byte, error) { if name == nil { return nil, buildError( - momentoerrors.InvalidArgumentError, "element name cannot be nil or empty", nil, + momentoerrors.InvalidArgumentError, "element value cannot be nil or empty", nil, ) } // just validate not empty using prepareName nameBytes := name.asBytes() - _, err := prepareName(string(nameBytes), "element name") + _, err := prepareName(string(nameBytes), "element value") if err != nil { return nil, err } diff --git a/momento/sorted_set_test.go b/momento/sorted_set_test.go index c43ecef8..0a712009 100644 --- a/momento/sorted_set_test.go +++ b/momento/sorted_set_test.go @@ -326,7 +326,7 @@ var _ = Describe("SortedSet", func() { ).To(Equal(&SortedSetGetRankHit{Rank: 0})) }) - It(`returns an error for a nil element name`, func() { + It(`returns an error for a nil element value`, func() { Expect( sharedContext.Client.SortedSetGetRank( sharedContext.Ctx, @@ -385,7 +385,7 @@ var _ = Describe("SortedSet", func() { )) }) - It(`returns an error when element names are nil`, func() { + It(`returns an error when element values are nil`, func() { Expect( sharedContext.Client.SortedSetGetScore( sharedContext.Ctx, @@ -486,7 +486,7 @@ var _ = Describe("SortedSet", func() { ).To(BeAssignableToTypeOf(&SortedSetIncrementScoreSuccess{Value: 50})) }) - It("returns an error when element name is nil", func() { + It("returns an error when element value is nil", func() { Expect( sharedContext.Client.SortedSetIncrementScore( sharedContext.Ctx,