Merge pull request #5591 from tstromberg/unused-update2

Remove unused enableUpdateNotification variable
pull/5582/head^2
Thomas Strömberg 2019-10-10 11:52:41 -07:00 committed by GitHub
commit 0a6749397a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 17 deletions

View File

@ -120,15 +120,14 @@ const (
)
var (
registryMirror []string
dockerEnv []string
dockerOpt []string
insecureRegistry []string
apiServerNames []string
addonList []string
apiServerIPs []net.IP
extraOptions cfg.ExtraOptionSlice
enableUpdateNotification = true
registryMirror []string
dockerEnv []string
dockerOpt []string
insecureRegistry []string
apiServerNames []string
addonList []string
apiServerIPs []net.IP
extraOptions cfg.ExtraOptionSlice
)
func init() {

View File

@ -28,10 +28,6 @@ var updateCheckCmd = &cobra.Command{
Use: "update-check",
Short: "Print current and latest version number",
Long: `Print current and latest version number`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
// Explicitly disable update checking for the version command
enableUpdateNotification = false
},
Run: func(command *cobra.Command, args []string) {
url := notify.GithubMinikubeReleasesURL
r, err := notify.GetAllVersionsFromURL(url)

View File

@ -26,10 +26,6 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version of minikube",
Long: `Print the version of minikube.`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
// Explicitly disable update checking for the version command
enableUpdateNotification = false
},
Run: func(command *cobra.Command, args []string) {
out.Ln("minikube version: %v", version.GetVersion())
gitCommitID := version.GetGitCommitID()