use stdlib "slices".

This commit is contained in:
fiatjaf
2024-02-08 16:33:39 -03:00
parent 555197973b
commit 9c4ea87d0b
8 changed files with 13 additions and 8 deletions

View File

@ -3,8 +3,9 @@ package nostr
import ( import (
"encoding/json" "encoding/json"
"slices"
"github.com/mailru/easyjson" "github.com/mailru/easyjson"
"golang.org/x/exp/slices"
) )
type Filters []Filter type Filters []Filter

View File

@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"testing" "testing"
"golang.org/x/exp/slices" "slices"
) )
func TestFilterUnmarshal(t *testing.T) { func TestFilterUnmarshal(t *testing.T) {

View File

@ -1,6 +1,6 @@
package nip11 package nip11
import "golang.org/x/exp/slices" import "slices"
type RelayInformationDocument struct { type RelayInformationDocument struct {
Name string `json:"name"` Name string `json:"name"`

View File

@ -1,8 +1,9 @@
package nip29 package nip29
import ( import (
"slices"
"github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr"
"golang.org/x/exp/slices"
) )
type Role struct { type Role struct {

View File

@ -5,10 +5,11 @@ import (
"fmt" "fmt"
"sync" "sync"
"slices"
"github.com/mailru/easyjson" "github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip04" "github.com/nbd-wtf/go-nostr/nip04"
"golang.org/x/exp/slices"
) )
var _ Signer = (*DynamicSigner)(nil) var _ Signer = (*DynamicSigner)(nil)

View File

@ -5,10 +5,11 @@ import (
"fmt" "fmt"
"sync" "sync"
"slices"
"github.com/mailru/easyjson" "github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip04" "github.com/nbd-wtf/go-nostr/nip04"
"golang.org/x/exp/slices"
) )
var _ Signer = (*StaticKeySigner)(nil) var _ Signer = (*StaticKeySigner)(nil)

View File

@ -8,8 +8,9 @@ import (
"sync" "sync"
"time" "time"
"slices"
"github.com/puzpuzpuz/xsync/v3" "github.com/puzpuzpuz/xsync/v3"
"golang.org/x/exp/slices"
) )
const ( const (

View File

@ -5,7 +5,7 @@ import (
"errors" "errors"
"strings" "strings"
"golang.org/x/exp/slices" "slices"
) )
type Tag []string type Tag []string