Commit 7fd5a19c authored by carehabit's avatar carehabit Committed by GitHub

all: use the built-in slices library (#10005)

Signed-off-by: default avatarcarehabit <shenyuting@outlook.com>
parent 3c7922c8
......@@ -2,11 +2,11 @@ package flags
import (
"fmt"
"slices"
"strings"
"time"
"github.com/urfave/cli/v2"
"golang.org/x/exp/slices"
"github.com/ethereum-optimism/optimism/op-batcher/compressor"
plasma "github.com/ethereum-optimism/optimism/op-plasma"
......
......@@ -5,10 +5,10 @@ import (
"fmt"
"os"
"path/filepath"
"slices"
"strings"
"github.com/ethereum/go-ethereum/common"
"golang.org/x/exp/slices"
)
const gameDirPrefix = "game-"
......
......@@ -4,12 +4,12 @@ import (
"context"
"errors"
"fmt"
"slices"
"github.com/ethereum-optimism/optimism/op-challenger/game/types"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"golang.org/x/exp/slices"
)
var errUnknownGame = errors.New("unknown game")
......
......@@ -3,6 +3,7 @@ package scheduler
import (
"context"
"fmt"
"slices"
"testing"
"github.com/ethereum-optimism/optimism/op-challenger/game/scheduler/test"
......@@ -11,7 +12,6 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
)
func TestScheduleNewGames(t *testing.T) {
......
......@@ -7,6 +7,7 @@ import (
"math/big"
"os"
"runtime"
"slices"
"testing"
"time"
......@@ -28,7 +29,6 @@ import (
"github.com/libp2p/go-libp2p/core/peer"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
......
package node
import (
"slices"
"testing"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
"github.com/ethereum/go-ethereum/params"
)
......
......@@ -5,6 +5,7 @@ import (
"crypto/rand"
"math/big"
"net"
"slices"
"testing"
"time"
......@@ -17,7 +18,6 @@ import (
mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
ma "github.com/multiformats/go-multiaddr"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
......
......@@ -3,10 +3,10 @@ package derive
import (
"context"
"io"
"slices"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"golang.org/x/exp/slices"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-service/eth"
......
......@@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"slices"
"testing"
"github.com/ethereum-optimism/optimism/op-service/sources/batching/rpcblock"
......@@ -13,7 +14,6 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
)
type expectedCall struct {
......
......@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"math/big"
"slices"
"testing"
"time"
......@@ -14,7 +15,6 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
)
type queueFunc func(id int, candidate TxCandidate, receiptCh chan TxReceipt[int], q *Queue[int]) bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment