use stdlib "slices".

This commit is contained in:
fiatjaf
2024-02-08 16:35:35 -03:00
parent e9bcad8614
commit 9b43da0b17
7 changed files with 10 additions and 7 deletions

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
"github.com/fiatjaf/khatru"
"github.com/fiatjaf/eventstore/elasticsearch"
"github.com/fiatjaf/khatru"
)
func main() {

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
"github.com/fiatjaf/khatru"
"github.com/fiatjaf/eventstore/postgresql"
"github.com/fiatjaf/khatru"
)
func main() {

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
"github.com/fiatjaf/khatru"
"github.com/fiatjaf/eventstore/sqlite3"
"github.com/fiatjaf/khatru"
)
func main() {

2
go.mod
View File

@@ -9,7 +9,6 @@ require (
github.com/puzpuzpuz/xsync/v3 v3.0.2
github.com/rs/cors v1.7.0
github.com/sebest/xff v0.0.0-20210106013422-671bd2870b3a
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
)
require (
@@ -51,6 +50,7 @@ require (
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.51.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect

View File

@@ -3,8 +3,9 @@ package policies
import (
"context"
"slices"
"github.com/nbd-wtf/go-nostr"
"golang.org/x/exp/slices"
)
// PreventTooManyIndexableTags returns a function that can be used as a RejectFilter that will reject

View File

@@ -3,8 +3,9 @@ package policies
import (
"context"
"slices"
"github.com/nbd-wtf/go-nostr"
"golang.org/x/exp/slices"
)
// NoComplexFilters disallows filters with more than 2 tags.

View File

@@ -3,9 +3,10 @@ package policies
import (
"context"
"slices"
"github.com/fiatjaf/khatru"
"github.com/nbd-wtf/go-nostr"
"golang.org/x/exp/slices"
)
// RejectKind04Snoopers prevents reading NIP-04 messages from people not involved in the conversation.