go mod tidy works now at least.

This commit is contained in:
fiatjaf
2025-04-15 18:39:14 -03:00
parent 2b5b646a62
commit cb0dd45a32
37 changed files with 540 additions and 917 deletions

View File

@@ -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")
}

View File

@@ -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)
}
}