1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-11 10:18:28 +09:00

GO-545 Fix linter

This commit is contained in:
Sergey 2022-12-09 16:38:53 +05:00
parent 94c9d5b899
commit f6bc95aa0b
No known key found for this signature in database
GPG key ID: 2B848483FF11C82C
2 changed files with 5 additions and 4 deletions

View file

@ -4,7 +4,6 @@ import (
"archive/zip"
"bytes"
"context"
_ "embed"
"fmt"
"io"
"io/ioutil"
@ -35,6 +34,8 @@ import (
"github.com/anytypeio/go-anytype-middleware/pkg/lib/pb/model"
"github.com/anytypeio/go-anytype-middleware/pkg/lib/threads"
"github.com/anytypeio/go-anytype-middleware/util/pbtypes"
_ "embed"
)
const CName = "builtinobjects"
@ -259,9 +260,9 @@ func (b *builtinObjects) validate(st *state.State) (err error) {
if !bundle.HasRelation(rel.Key) {
// todo: temporarily, make this as error
log.Errorf("builtin objects should not contain custom relations, got %s in %s(%s)", rel.Key, st.RootId(), pbtypes.GetString(st.Details(), bundle.RelationKeyName.String()))
// return fmt.Errorf("builtin objects should not contain custom relations, got %s in %s(%s)", rel.Name, st.RootId(), pbtypes.GetString(st.Details(), bundle.RelationKeyName.String()))
}
}
st.Iterate(func(b simple.Block) (isContinue bool) {
if rb, ok := b.(relation.Block); ok {
relKeys = append(relKeys, rb.Model().GetRelation().Key)