From c43116226f37b6d3a36d24f094231b8af498b3c8 Mon Sep 17 00:00:00 2001 From: depthlending Date: Fri, 22 Mar 2024 18:39:34 +0800 Subject: [PATCH 1/2] chore: fix function names Signed-off-by: depthlending --- pkg/minikube/cruntime/cri.go | 2 +- pkg/minikube/download/download.go | 2 +- pkg/minikube/machine/fix.go | 4 ++-- pkg/minikube/tunnel/kic/ssh_tunnel.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/minikube/cruntime/cri.go b/pkg/minikube/cruntime/cri.go index 1244defb0ee5..fa3b2c1cb49c 100644 --- a/pkg/minikube/cruntime/cri.go +++ b/pkg/minikube/cruntime/cri.go @@ -140,7 +140,7 @@ func listCRIContainers(cr CommandRunner, root string, o ListContainersOptions) ( return fids, nil } -// pauseContainers pauses a list of containers +// pauseCRIContainers pauses a list of containers func pauseCRIContainers(cr CommandRunner, root string, ids []string) error { baseArgs := []string{"runc"} if root != "" { diff --git a/pkg/minikube/download/download.go b/pkg/minikube/download/download.go index cfc4a9cb5901..a4404cbf458e 100644 --- a/pkg/minikube/download/download.go +++ b/pkg/minikube/download/download.go @@ -111,7 +111,7 @@ func download(src, dst string) error { return os.Rename(tmpDst, dst) } -// withinUnitTset detects if we are in running within a unit-test +// withinUnitTest detects if we are in running within a unit-test func withinUnitTest() bool { // Nope, it's the integration test if flag.Lookup("minikube-start-args") != nil || strings.HasPrefix(filepath.Base(os.Args[0]), "e2e-") { diff --git a/pkg/minikube/machine/fix.go b/pkg/minikube/machine/fix.go index fc66e2320490..63faa5acb1e3 100644 --- a/pkg/minikube/machine/fix.go +++ b/pkg/minikube/machine/fix.go @@ -186,7 +186,7 @@ func maybeWarnAboutEvalEnv(drver string, name string) { } } -// ensureGuestClockSync ensures that the guest system clock is relatively in-sync +// ensureSyncedGuestClock ensures that the guest system clock is relatively in-sync func ensureSyncedGuestClock(h hostRunner, drv string) error { if !driver.IsVM(drv) { return nil @@ -230,7 +230,7 @@ func guestClockDelta(h hostRunner, local time.Time) (time.Duration, error) { return d, nil } -// adjustSystemClock adjusts the guest system clock to be nearer to the host system clock +// adjustGuestClock adjusts the guest system clock to be nearer to the host system clock func adjustGuestClock(h hostRunner, t time.Time) error { out, err := h.RunSSHCommand(fmt.Sprintf("sudo date -s @%d", t.Unix())) klog.Infof("clock set: %s (err=%v)", out, err) diff --git a/pkg/minikube/tunnel/kic/ssh_tunnel.go b/pkg/minikube/tunnel/kic/ssh_tunnel.go index bcc355c1bf42..029194718659 100644 --- a/pkg/minikube/tunnel/kic/ssh_tunnel.go +++ b/pkg/minikube/tunnel/kic/ssh_tunnel.go @@ -187,7 +187,7 @@ func (t *SSHTunnel) stopMarkedConnections() { } } -// sshConnName creates a uniq name for the tunnel, using its name/clusterIP/ports. +// sshConnUniqName creates an uniq name for the tunnel, using its name/clusterIP/ports. // This allows a new process to be created if an existing service was changed, // the new process will support the IP/Ports change occurred. func sshConnUniqName(service v1.Service) string { From f468a989748330f0f53b6ec0468fccc31bee8c7a Mon Sep 17 00:00:00 2001 From: Steven Powell <44844360+spowelljr@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:51:24 -0700 Subject: [PATCH 2/2] Update pkg/minikube/tunnel/kic/ssh_tunnel.go --- pkg/minikube/tunnel/kic/ssh_tunnel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/tunnel/kic/ssh_tunnel.go b/pkg/minikube/tunnel/kic/ssh_tunnel.go index 029194718659..001639ef766e 100644 --- a/pkg/minikube/tunnel/kic/ssh_tunnel.go +++ b/pkg/minikube/tunnel/kic/ssh_tunnel.go @@ -187,7 +187,7 @@ func (t *SSHTunnel) stopMarkedConnections() { } } -// sshConnUniqName creates an uniq name for the tunnel, using its name/clusterIP/ports. +// sshConnUniqName creates a uniq name for the tunnel, using its name/clusterIP/ports. // This allows a new process to be created if an existing service was changed, // the new process will support the IP/Ports change occurred. func sshConnUniqName(service v1.Service) string {