From 9c4ea87d0b73d3a880a6be856960ed393f4dec24 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Thu, 8 Feb 2024 16:33:39 -0300 Subject: [PATCH] use stdlib "slices". --- filter.go | 3 ++- filter_test.go | 2 +- nip11/types.go | 2 +- nip29/nip29.go | 3 ++- nip46/dynamic-signer.go | 3 ++- nip46/static-key-signer.go | 3 ++- pool.go | 3 ++- tags.go | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/filter.go b/filter.go index b375032..044deeb 100644 --- a/filter.go +++ b/filter.go @@ -3,8 +3,9 @@ package nostr import ( "encoding/json" + "slices" + "github.com/mailru/easyjson" - "golang.org/x/exp/slices" ) type Filters []Filter diff --git a/filter_test.go b/filter_test.go index b73d024..6fb9ef6 100644 --- a/filter_test.go +++ b/filter_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "golang.org/x/exp/slices" + "slices" ) func TestFilterUnmarshal(t *testing.T) { diff --git a/nip11/types.go b/nip11/types.go index 523985a..1894893 100644 --- a/nip11/types.go +++ b/nip11/types.go @@ -1,6 +1,6 @@ package nip11 -import "golang.org/x/exp/slices" +import "slices" type RelayInformationDocument struct { Name string `json:"name"` diff --git a/nip29/nip29.go b/nip29/nip29.go index 5d39580..74defb7 100644 --- a/nip29/nip29.go +++ b/nip29/nip29.go @@ -1,8 +1,9 @@ package nip29 import ( + "slices" + "github.com/nbd-wtf/go-nostr" - "golang.org/x/exp/slices" ) type Role struct { diff --git a/nip46/dynamic-signer.go b/nip46/dynamic-signer.go index a6c0e77..5bac025 100644 --- a/nip46/dynamic-signer.go +++ b/nip46/dynamic-signer.go @@ -5,10 +5,11 @@ import ( "fmt" "sync" + "slices" + "github.com/mailru/easyjson" "github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr/nip04" - "golang.org/x/exp/slices" ) var _ Signer = (*DynamicSigner)(nil) diff --git a/nip46/static-key-signer.go b/nip46/static-key-signer.go index 5771f4b..6ddb33d 100644 --- a/nip46/static-key-signer.go +++ b/nip46/static-key-signer.go @@ -5,10 +5,11 @@ import ( "fmt" "sync" + "slices" + "github.com/mailru/easyjson" "github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr/nip04" - "golang.org/x/exp/slices" ) var _ Signer = (*StaticKeySigner)(nil) diff --git a/pool.go b/pool.go index 40ccd5f..49fdb54 100644 --- a/pool.go +++ b/pool.go @@ -8,8 +8,9 @@ import ( "sync" "time" + "slices" + "github.com/puzpuzpuz/xsync/v3" - "golang.org/x/exp/slices" ) const ( diff --git a/tags.go b/tags.go index 2b24ecd..c02a95e 100644 --- a/tags.go +++ b/tags.go @@ -5,7 +5,7 @@ import ( "errors" "strings" - "golang.org/x/exp/slices" + "slices" ) type Tag []string