use stdlib "slices".

This commit is contained in:
fiatjaf
2024-02-08 16:36:18 -03:00
parent 1b0ecd993e
commit 4cb1ec89c0
7 changed files with 7 additions and 8 deletions

View File

@@ -9,9 +9,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"slices"
"github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcd/wire"
"golang.org/x/exp/slices"
) )
func NewEsploraClient(url string) Bitcoin { func NewEsploraClient(url string) Bitcoin {

1
go.mod
View File

@@ -6,7 +6,6 @@ require (
github.com/btcsuite/btcd v0.23.4 github.com/btcsuite/btcd v0.23.4
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
golang.org/x/crypto v0.13.0 golang.org/x/crypto v0.13.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
) )
require ( require (

2
go.sum
View File

@@ -66,8 +66,6 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=

View File

@@ -3,7 +3,7 @@ package opentimestamps
import ( import (
"strings" "strings"
"golang.org/x/exp/slices" "slices"
) )
// CompareInstructions returns negative if a<b, 0 if a=b and positive if a>b. // CompareInstructions returns negative if a<b, 0 if a=b and positive if a>b.

2
ots.go
View File

@@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"strings" "strings"
"golang.org/x/exp/slices" "slices"
) )
/* /*

View File

@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"io" "io"
"golang.org/x/exp/slices" "slices"
) )
func parseCalendarServerResponse(buf Buffer) (Sequence, error) { func parseCalendarServerResponse(buf Buffer) (Sequence, error) {

View File

@@ -3,9 +3,10 @@ package opentimestamps
import ( import (
"fmt" "fmt"
"slices"
"github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcd/wire"
"golang.org/x/exp/slices"
) )
type Bitcoin interface { type Bitcoin interface {