go mod tidy works now at least.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
package bluge
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"fiatjaf.com/nostr"
|
||||
"fiatjaf.com/nostr/eventstore"
|
||||
"github.com/blugelabs/bluge"
|
||||
"github.com/blugelabs/bluge/analysis/token"
|
||||
"fiatjaf.com/nostr/eventstore"
|
||||
"golang.org/x/text/unicode/norm"
|
||||
)
|
||||
|
||||
@@ -50,3 +52,7 @@ func (b *BlugeBackend) Init() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *BlugeBackend) CountEvents(nostr.Filter) (int64, error) {
|
||||
return 0, errors.New("not supported")
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package bluge
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"fiatjaf.com/nostr"
|
||||
@@ -9,7 +8,7 @@ import (
|
||||
"fiatjaf.com/nostr/eventstore/internal"
|
||||
)
|
||||
|
||||
func (b *BlugeBackend) ReplaceEvent(ctx context.Context, evt nostr.Event) error {
|
||||
func (b *BlugeBackend) ReplaceEvent(evt nostr.Event) error {
|
||||
b.Lock()
|
||||
defer b.Unlock()
|
||||
|
||||
@@ -30,7 +29,7 @@ func (b *BlugeBackend) ReplaceEvent(ctx context.Context, evt nostr.Event) error
|
||||
}
|
||||
|
||||
if shouldStore {
|
||||
if err := b.SaveEvent(ctx, evt); err != nil && err != eventstore.ErrDupEvent {
|
||||
if err := b.SaveEvent(evt); err != nil && err != eventstore.ErrDupEvent {
|
||||
return fmt.Errorf("failed to save: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user