Commit 1dbe9d82 authored by cui's avatar cui Committed by GitHub

refactor: using maps.Keys (#11547)

parent 5212c4db
...@@ -2,6 +2,7 @@ package compressor ...@@ -2,6 +2,7 @@ package compressor
import ( import (
"github.com/ethereum-optimism/optimism/op-node/rollup/derive" "github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"golang.org/x/exp/maps"
) )
type FactoryFunc func(Config) (derive.Compressor, error) type FactoryFunc func(Config) (derive.Compressor, error)
...@@ -25,7 +26,5 @@ var Kinds = map[string]FactoryFunc{ ...@@ -25,7 +26,5 @@ var Kinds = map[string]FactoryFunc{
var KindKeys []string var KindKeys []string
func init() { func init() {
for k := range Kinds { KindKeys = maps.Keys(Kinds)
KindKeys = append(KindKeys, k)
}
} }
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