Use const
@@ -18,7 +18,6 @@ package update
import (
"context"
- "fmt"
"io/ioutil"
"net/http"
"os"
@@ -30,6 +29,8 @@ import (
"github.com/pkg/errors"
)
+const latestVersionURL = "https://storage.googleapis.com/skaffold/releases/latest/VERSION"
+
// IsUpdateCheckEnabled returns whether or not the update check is enabled
// It is true by default, but setting it to any other value than true will disable the check
func IsUpdateCheckEnabled() bool {
@@ -42,8 +43,6 @@ func IsUpdateCheckEnabled() bool {
return v == "" || strings.ToLower(v) == "true"
}
-var latestVersionURL = fmt.Sprintf("https://storage.googleapis.com/skaffold/releases/latest/VERSION")
-
// GetLatestVersion uses a VERSION file stored on GCS to determine the latest released version of skaffold
func GetLatestVersion(ctx context.Context) (semver.Version, error) {
resp, err := http.Get(latestVersionURL)
