Skip to content

Commit

Permalink
chore: remove now unused getVertXVersions function
Browse files Browse the repository at this point in the history
  • Loading branch information
metacosm committed Jan 16, 2020
1 parent df8eb9d commit 28c44d6
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions pkg/hal/cli/component/create.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package component

import (
"encoding/json"
"fmt"
"github.com/spf13/cobra"
"halkyon.io/api/component/v1beta1"
Expand Down Expand Up @@ -250,38 +249,6 @@ func getRuntimes() chan map[string]*halkyonRuntime {
return r
}

func getVertXVersions() chan []string {
versions := make(chan []string)
go func() {
resp := io.HttpGet("https://start.vertx.io", "metadata", nil)
type version struct {
Number string
Exclusions []string
}

var objMap map[string]*json.RawMessage
err := json.Unmarshal(resp, &objMap)
if err != nil {
versions <- []string{"couldn't retrieve vert.x metadata: " + err.Error()}
}

var versionObjs []version
err = json.Unmarshal(*objMap["versions"], &versionObjs)
if err != nil {
versions <- []string{"couldn't retrieve vert.x metadata: " + err.Error()}
}

vers := make([]string, 0, len(versionObjs))
for _, v := range versionObjs {
vers = append(vers, v.Number)
}

versions <- vers
}()

return versions
}

func getRuntimeNames() []string {
result := make([]string, 0, len(runtimes))
for k := range runtimes {
Expand Down

0 comments on commit 28c44d6

Please sign in to comment.