Skip to content

Commit

Permalink
GO-4666: fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: AnastasiaShemyakinskaya <[email protected]>
  • Loading branch information
AnastasiaShemyakinskaya committed Dec 20, 2024
1 parent 0ae9c7e commit b369117
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
9 changes: 0 additions & 9 deletions core/block/editor/userdataobject/userdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ type userDataObject struct {
storeSource source.Store
crdtDb anystore.DB
arenaPool *anyenc.ArenaPool

ctx context.Context
cancel context.CancelFunc
}

func New(sb smartblock.SmartBlock, crdtDb anystore.DB) UserDataObject {
Expand All @@ -46,7 +43,6 @@ func New(sb smartblock.SmartBlock, crdtDb anystore.DB) UserDataObject {
}

func (u *userDataObject) Init(ctx *smartblock.InitContext) error {
u.ctx, u.cancel = context.WithCancel(context.Background())
err := u.SmartBlock.Init(ctx)
if err != nil {
return err
Expand All @@ -69,11 +65,6 @@ func (u *userDataObject) Init(ctx *smartblock.InitContext) error {
return nil
}

func (u *userDataObject) Close() error {
u.cancel()
return u.SmartBlock.Close()
}

func (u *userDataObject) SaveContact(ctx context.Context, contact *Contact) error {
arena := u.arenaPool.Get()
defer func() {
Expand Down
4 changes: 2 additions & 2 deletions core/contact/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ func (s *service) Run(ctx context.Context) (err error) {
func (s *service) registerContact(ctx context.Context, contact *userdataobject.Contact) error {
key, err := decodeAESKeyFromBase64(contact.Key())
if err != nil {
return fmt.Errorf("failed to register contact identity %s", err)
return fmt.Errorf("failed to register contact identity %w", err)
}
err = s.identityService.RegisterIdentity(s.spaceService.TechSpaceId(), contact.Identity(), key, s.handleIdentityUpdate)
if err != nil {
return fmt.Errorf("failed to register contact identity %s", err)
return fmt.Errorf("failed to register contact identity %w", err)
}
s.applyContactStoreData(contact)
return nil
Expand Down

0 comments on commit b369117

Please sign in to comment.