From 06fb28c2c3f823625d5a69c7aca5ab4af29404d1 Mon Sep 17 00:00:00 2001 From: Tongyao Si Date: Mon, 6 Mar 2023 14:35:43 +0000 Subject: [PATCH] chore: rename CheckPaused to VerifyNotPaused --- cmd/minikube/cmd/config/disable.go | 2 +- cmd/minikube/cmd/config/enable.go | 2 +- pkg/addons/addons.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/minikube/cmd/config/disable.go b/cmd/minikube/cmd/config/disable.go index 1e569c1c16ba..b70befbcb193 100644 --- a/cmd/minikube/cmd/config/disable.go +++ b/cmd/minikube/cmd/config/disable.go @@ -35,7 +35,7 @@ var addonsDisableCmd = &cobra.Command{ if len(args) != 1 { exit.Message(reason.Usage, "usage: minikube addons disable ADDON_NAME") } - err := addons.CheckPaused(ClusterFlagValue(), false) + err := addons.VerifyNotPaused(ClusterFlagValue(), false) if err != nil { exit.Error(reason.InternalAddonDisablePaused, "disable failed", err) } diff --git a/cmd/minikube/cmd/config/enable.go b/cmd/minikube/cmd/config/enable.go index 9f14a18aea69..9c1572715109 100644 --- a/cmd/minikube/cmd/config/enable.go +++ b/cmd/minikube/cmd/config/enable.go @@ -48,7 +48,7 @@ var addonsEnableCmd = &cobra.Command{ exit.Message(reason.Usage, "You cannot enable addons on a cluster without Kubernetes, to enable Kubernetes on your cluster, run: minikube start --kubernetes-version=stable") } - err = addons.CheckPaused(ClusterFlagValue(), true) + err = addons.VerifyNotPaused(ClusterFlagValue(), true) if err != nil { exit.Error(reason.InternalAddonEnablePaused, "enabled failed", err) } diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index ed81d839bf1e..3283bf7aba16 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -588,8 +588,8 @@ func UpdateConfigToDisable(cc *config.ClusterConfig) { } } -// CheckPaused checks whether the cluster is paused before enable/disable an addon. -func CheckPaused(profile string, enable bool) error { +// VerifyNotPaused verifies the cluster is not paused before enable/disable an addon. +func VerifyNotPaused(profile string, enable bool) error { klog.Info("checking whether the cluster is paused") cc, err := config.Load(profile)