From 28c44d68438b0528678457f30b73b71d8d96e9ac Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Thu, 16 Jan 2020 21:02:54 +0100 Subject: [PATCH] chore: remove now unused getVertXVersions function --- pkg/hal/cli/component/create.go | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/pkg/hal/cli/component/create.go b/pkg/hal/cli/component/create.go index 7437232..f12bac9 100644 --- a/pkg/hal/cli/component/create.go +++ b/pkg/hal/cli/component/create.go @@ -1,7 +1,6 @@ package component import ( - "encoding/json" "fmt" "github.com/spf13/cobra" "halkyon.io/api/component/v1beta1" @@ -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 {