Skip to content

Commit

Permalink
PR(LINT-FIX): Make linter happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadlone committed Jul 13, 2023
1 parent 9551e71 commit 41c4738
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion client/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

"github.com/fxamacker/cbor/v2"
"github.com/ipfs/go-cid"

"github.com/sourcenetwork/defradb/client/request"
ccid "github.com/sourcenetwork/defradb/core/cid"
)
Expand Down Expand Up @@ -109,7 +110,10 @@ func NewDocFromMap(data map[string]any) (*Document, error) {

// if no key was specified, then we assume it doesn't exist and we generate, and set it.
if !hasKey {
doc.generateAndSetDocKey()
err = doc.generateAndSetDocKey()
if err != nil {
return nil, err
}
}

return doc, nil
Expand Down
3 changes: 2 additions & 1 deletion client/document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ package client
import (
"testing"

ccid "github.com/sourcenetwork/defradb/core/cid"
"github.com/stretchr/testify/assert"

ccid "github.com/sourcenetwork/defradb/core/cid"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion datastore/blockstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ import (
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
ccid "github.com/sourcenetwork/defradb/core/cid"
"github.com/stretchr/testify/require"

ccid "github.com/sourcenetwork/defradb/core/cid"

"github.com/sourcenetwork/defradb/datastore/memory"
)

Expand Down
1 change: 0 additions & 1 deletion db/collection_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ func (c *collection) applyMerge(
fd, isValidField = c.desc.Schema.GetField(mfield)
if !isValidField {
return client.NewErrFieldNotExist(mfield)

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,4 @@ func TestDeletionOfADocumentUsingSingleKeyWithShowDeletedDocumentQuery(t *testin
}

fixture.ExecuteTestCase(t, test)

}

0 comments on commit 41c4738

Please sign in to comment.