From 15d4cdb047d748d37aeea8e5f016562f61242f89 Mon Sep 17 00:00:00 2001 From: Aleksandr Trushkin Date: Sun, 4 Feb 2024 22:00:19 +0300 Subject: [PATCH] fix build --- internal/storage/badger/goodsitem.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/storage/badger/goodsitem.go b/internal/storage/badger/goodsitem.go index 39bf24c..872b969 100644 --- a/internal/storage/badger/goodsitem.go +++ b/internal/storage/badger/goodsitem.go @@ -31,6 +31,7 @@ func newGoodsItemClient(db *badger.DB, serializeAsJSON bool) *goodsItemClient { s = goodsItemJSONSerializer{} } else { s = goodsItemFlatbufSerializer{} + } return &goodsItemClient{ db: db, @@ -313,9 +314,9 @@ type itemSerializer[T any] interface { type goodsItemJSONSerializer struct{} func (goodsItemJSONSerializer) Serialize(in entity.GoodsItem) ([]byte, error) { - data, err := json.Marshal(in) + data, err := json.Marshal(in) if err != nil { - return nil, fmt.Errorf("marshalling data: %w", err) + return nil, fmt.Errorf("marshalling data: %w", err) } return data, nil