From aaea352e9e731fbcafb7bc8398504151bb18c6e4 Mon Sep 17 00:00:00 2001 From: Shidil Eringa Date: Tue, 16 Jan 2024 15:16:16 +1100 Subject: [PATCH] fix: interface type mismatch for TransactItems --- client_test.go | 16 ++++++++++++++++ interface.go | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 client_test.go diff --git a/client_test.go b/client_test.go new file mode 100644 index 0000000..749962d --- /dev/null +++ b/client_test.go @@ -0,0 +1,16 @@ +package dynago_test + +import ( + "testing" + + "github.com/oolio-group/dynago" +) + +func TestClient(t *testing.T) { + // test if dynago.Client implements dynago.DynamoClient interface + var client dynago.DynamoClient = &dynago.Client{} + _, ok := client.(*dynago.Client) + if !ok { + t.Errorf("client does not implement DynamoClient interface") + } +} diff --git a/interface.go b/interface.go index ebbcf39..f6b1cff 100644 --- a/interface.go +++ b/interface.go @@ -29,7 +29,7 @@ type WriteAPI interface { type TransactionAPI interface { TransactPutItems(ctx context.Context, items []*TransactPutItemsInput) error - TransactItems(ctx context.Context, input []types.TransactWriteItem) error + TransactItems(ctx context.Context, input ...types.TransactWriteItem) error } type ReadAPI interface {