From 2f0c284ec345e5f81216c66c82e2e9880366d147 Mon Sep 17 00:00:00 2001 From: eaddingtonwhite <5491827+ellery44@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:42:32 -0700 Subject: [PATCH] chore: fix linters --- caching/caching_test.go | 2 +- internal/serializer/bench_test.go | 4 ++-- internal/serializer/serializer.go | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/caching/caching_test.go b/caching/caching_test.go index 29e8597..09e42ca 100644 --- a/caching/caching_test.go +++ b/caching/caching_test.go @@ -276,7 +276,7 @@ func TestBatchGetItemAllHits(t *testing.T) { if err != nil { t.Errorf("error serializing movie 1 map: %+v", err) } - item2ToCache, err := ddbSerializer.Serialize(movie1Map) + item2ToCache, err := ddbSerializer.Serialize(movie2Map) if err != nil { t.Errorf("error serializing movie 2 map: %+v", err) } diff --git a/internal/serializer/bench_test.go b/internal/serializer/bench_test.go index d480224..4d26ffb 100644 --- a/internal/serializer/bench_test.go +++ b/internal/serializer/bench_test.go @@ -35,7 +35,7 @@ func BenchmarkSerialization(b *testing.B) { for _, serializer := range serializers { for _, payload := range testPayloads { - b.Run(serializer.name+"Marshal/"+payload.name, func(b *testing.B) { + b.Run(serializer.name+"Serialize/"+payload.name, func(b *testing.B) { for i := 0; i < b.N; i++ { _, err := serializer.serializer.Serialize(payload.item) if err != nil { @@ -44,7 +44,7 @@ func BenchmarkSerialization(b *testing.B) { } }) - b.Run(serializer.name+"Unmarshal/"+payload.name, func(b *testing.B) { + b.Run(serializer.name+"Deserialize/"+payload.name, func(b *testing.B) { data, err := serializer.serializer.Serialize(payload.item) if err != nil { b.Error(err) diff --git a/internal/serializer/serializer.go b/internal/serializer/serializer.go index 95254b3..0b8c891 100644 --- a/internal/serializer/serializer.go +++ b/internal/serializer/serializer.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "fmt" + "github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue" "github.com/aws/aws-sdk-go-v2/service/dynamodb/types" "github.com/vmihailenco/msgpack/v5"