Skip to content

Commit a29c41f

Browse files
committed
chore: remove redundant code
1 parent 8dbaab8 commit a29c41f

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

models/initia/run_l1_node.go

-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"os/exec"
77
"path/filepath"
88
"runtime"
9-
"sort"
109
"strconv"
1110
"strings"
1211
"time"
@@ -92,11 +91,6 @@ type RunL1NodeVersionSelect struct {
9291

9392
func NewRunL1NodeVersionSelect(state *RunL1NodeState) *RunL1NodeVersionSelect {
9493
versions := utils.ListInitiaReleases("https://api.github.com/repos/initia-labs/initia/releases")
95-
options := make([]string, 0, len(versions))
96-
for key := range versions {
97-
options = append(options, key)
98-
}
99-
sort.Sort(sort.Reverse(sort.StringSlice(options)))
10094
return &RunL1NodeVersionSelect{
10195
Selector: utils.Selector[string]{
10296
Options: utils.SortVersions(versions),

models/minitia/launch.go

-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"fmt"
55
"os"
66
"path/filepath"
7-
"sort"
87
"strings"
98
"time"
109

@@ -228,11 +227,6 @@ type VersionSelect struct {
228227

229228
func NewRunL1NodeVersionSelect(state *LaunchState) *VersionSelect {
230229
versions := utils.ListInitiaReleases(fmt.Sprintf("https://api.github.com/repos/initia-labs/mini%s/releases", strings.ToLower(state.vmType)))
231-
options := make([]string, 0, len(versions))
232-
for key := range versions {
233-
options = append(options, key)
234-
}
235-
sort.Sort(sort.Reverse(sort.StringSlice(options)))
236230
return &VersionSelect{
237231
Selector: utils.Selector[string]{
238232
Options: utils.SortVersions(versions),

0 commit comments

Comments
 (0)