func URL(version string) string {
	version = normalizeVersion(version)
	t := template.Must(template.New("URL").Parse(KubectlURLTemplate))
	b := bytes.NewBuffer(nil)
	t.Execute(b, &kubectlVersion{
		Version: version,
		OS:      runtime.GOOS,
		Arch:    runtime.GOARCH,
	})
	return b.String()
}
URL returns the URL where a given kubectl version should be downloaded from
package kubectl
import (
	"bytes"
	"fmt"
	"io"
	"net/http"
	"os"
	"os/exec"
	"regexp"
	"runtime"
	"syscall"
	"text/template"
)
var KubectlURLTemplate = "https://storage.googleapis.com/kubernetes-release/release/v{{ .Version }}/bin/{{ .OS }}/{{ .Arch }}/kubectl"
var versionRegexp = regexp.MustCompile("([0-9.]+)")
type kubectlVersion struct {
	Version string
	OS      string
	Arch    string
}
func homeDir() string {
	if h := os.Getenv("HOME"); h != "" {
		return h
	}
	return os.Getenv("USERPROFILE")  
}
func normalizeVersion(version string) string {
	versionRegexp.Longest()
	matches := versionRegexp.FindAllString(version, 1)
	if len(matches) >= 1 {
		return matches[0]
	}
	return ""
}