Skip to content

Commit c00d8b3

Browse files
committed
Fix issues found by new linter version
1 parent ac10db6 commit c00d8b3

File tree

5 files changed

+13
-22
lines changed

5 files changed

+13
-22
lines changed

cmd/minikube/cmd/start.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,13 @@ const (
119119
)
120120

121121
var (
122-
registryMirror []string
123-
dockerEnv []string
124-
dockerOpt []string
125-
insecureRegistry []string
126-
apiServerNames []string
127-
apiServerIPs []net.IP
128-
extraOptions cfg.ExtraOptionSlice
129-
enableUpdateNotification = true
122+
registryMirror []string
123+
dockerEnv []string
124+
dockerOpt []string
125+
insecureRegistry []string
126+
apiServerNames []string
127+
apiServerIPs []net.IP
128+
extraOptions cfg.ExtraOptionSlice
130129
)
131130

132131
func init() {

cmd/minikube/cmd/update-check.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ var updateCheckCmd = &cobra.Command{
2828
Use: "update-check",
2929
Short: "Print current and latest version number",
3030
Long: `Print current and latest version number`,
31-
PersistentPreRun: func(cmd *cobra.Command, args []string) {
32-
// Explicitly disable update checking for the version command
33-
enableUpdateNotification = false
34-
},
3531
Run: func(command *cobra.Command, args []string) {
3632
url := notify.GithubMinikubeReleasesURL
3733
r, err := notify.GetAllVersionsFromURL(url)

cmd/minikube/cmd/version.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ var versionCmd = &cobra.Command{
2626
Use: "version",
2727
Short: "Print the version of minikube",
2828
Long: `Print the version of minikube.`,
29-
PersistentPreRun: func(cmd *cobra.Command, args []string) {
30-
// Explicitly disable update checking for the version command
31-
enableUpdateNotification = false
32-
},
3329
Run: func(command *cobra.Command, args []string) {
3430
out.Ln("minikube version: %v", version.GetVersion())
3531
gitCommitID := version.GetGitCommitID()

pkg/minikube/extract/extract.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ func checkKeyValueExpression(kvp *ast.KeyValueExpr, e *state) {
385385

386386
// Ok now this is just a mess
387387
if help, ok := kvp.Value.(*ast.BinaryExpr); ok {
388-
s := checkBinaryExpression(help, e)
388+
s := checkBinaryExpression(help)
389389
if s != "" {
390390
e.translations[s] = ""
391391
}
@@ -394,7 +394,7 @@ func checkKeyValueExpression(kvp *ast.KeyValueExpr, e *state) {
394394
}
395395

396396
// checkBinaryExpression checks binary expressions, stuff of the form x + y, for strings and concats them
397-
func checkBinaryExpression(b *ast.BinaryExpr, e *state) string {
397+
func checkBinaryExpression(b *ast.BinaryExpr) string {
398398
// Check the left side
399399
var s string
400400
if l, ok := b.X.(*ast.BasicLit); ok {
@@ -410,7 +410,7 @@ func checkBinaryExpression(b *ast.BinaryExpr, e *state) string {
410410
}
411411

412412
if b1, ok := b.X.(*ast.BinaryExpr); ok {
413-
if x := checkBinaryExpression(b1, e); x != "" {
413+
if x := checkBinaryExpression(b1); x != "" {
414414
s += x
415415
}
416416
}
@@ -429,7 +429,7 @@ func checkBinaryExpression(b *ast.BinaryExpr, e *state) string {
429429
}
430430

431431
if b1, ok := b.Y.(*ast.BinaryExpr); ok {
432-
if x := checkBinaryExpression(b1, e); x != "" {
432+
if x := checkBinaryExpression(b1); x != "" {
433433
s += x
434434
}
435435
}

pkg/minikube/tunnel/tunnel_manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ func (mgr *Manager) run(ctx context.Context, t controller, ready, check, done ch
122122
}
123123
}
124124

125-
func (mgr *Manager) cleanup(t controller) *Status {
126-
return t.cleanup()
125+
func (mgr *Manager) cleanup(t controller) {
126+
t.cleanup()
127127
}
128128

129129
// CleanupNotRunningTunnels cleans up tunnels that are not running

0 commit comments

Comments
 (0)