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