Fix issues found by new linter version
parent
ac10db6631
commit
c00d8b37c8
|
@ -119,14 +119,13 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
registryMirror []string
|
registryMirror []string
|
||||||
dockerEnv []string
|
dockerEnv []string
|
||||||
dockerOpt []string
|
dockerOpt []string
|
||||||
insecureRegistry []string
|
insecureRegistry []string
|
||||||
apiServerNames []string
|
apiServerNames []string
|
||||||
apiServerIPs []net.IP
|
apiServerIPs []net.IP
|
||||||
extraOptions cfg.ExtraOptionSlice
|
extraOptions cfg.ExtraOptionSlice
|
||||||
enableUpdateNotification = true
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -28,10 +28,6 @@ var updateCheckCmd = &cobra.Command{
|
||||||
Use: "update-check",
|
Use: "update-check",
|
||||||
Short: "Print current and latest version number",
|
Short: "Print current and latest version number",
|
||||||
Long: `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) {
|
Run: func(command *cobra.Command, args []string) {
|
||||||
url := notify.GithubMinikubeReleasesURL
|
url := notify.GithubMinikubeReleasesURL
|
||||||
r, err := notify.GetAllVersionsFromURL(url)
|
r, err := notify.GetAllVersionsFromURL(url)
|
||||||
|
|
|
@ -26,10 +26,6 @@ var versionCmd = &cobra.Command{
|
||||||
Use: "version",
|
Use: "version",
|
||||||
Short: "Print the version of minikube",
|
Short: "Print the version of minikube",
|
||||||
Long: `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) {
|
Run: func(command *cobra.Command, args []string) {
|
||||||
out.Ln("minikube version: %v", version.GetVersion())
|
out.Ln("minikube version: %v", version.GetVersion())
|
||||||
gitCommitID := version.GetGitCommitID()
|
gitCommitID := version.GetGitCommitID()
|
||||||
|
|
|
@ -385,7 +385,7 @@ func checkKeyValueExpression(kvp *ast.KeyValueExpr, e *state) {
|
||||||
|
|
||||||
// Ok now this is just a mess
|
// Ok now this is just a mess
|
||||||
if help, ok := kvp.Value.(*ast.BinaryExpr); ok {
|
if help, ok := kvp.Value.(*ast.BinaryExpr); ok {
|
||||||
s := checkBinaryExpression(help, e)
|
s := checkBinaryExpression(help)
|
||||||
if s != "" {
|
if s != "" {
|
||||||
e.translations[s] = ""
|
e.translations[s] = ""
|
||||||
}
|
}
|
||||||
|
@ -394,7 +394,7 @@ func checkKeyValueExpression(kvp *ast.KeyValueExpr, e *state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkBinaryExpression checks binary expressions, stuff of the form x + y, for strings and concats them
|
// checkBinaryExpression checks binary expressions, stuff of the form x + y, for strings and concats them
|
||||||
func checkBinaryExpression(b *ast.BinaryExpr, e *state) string {
|
func checkBinaryExpression(b *ast.BinaryExpr) string {
|
||||||
// Check the left side
|
// Check the left side
|
||||||
var s string
|
var s string
|
||||||
if l, ok := b.X.(*ast.BasicLit); ok {
|
if l, ok := b.X.(*ast.BasicLit); ok {
|
||||||
|
@ -410,7 +410,7 @@ func checkBinaryExpression(b *ast.BinaryExpr, e *state) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
if b1, ok := b.X.(*ast.BinaryExpr); ok {
|
if b1, ok := b.X.(*ast.BinaryExpr); ok {
|
||||||
if x := checkBinaryExpression(b1, e); x != "" {
|
if x := checkBinaryExpression(b1); x != "" {
|
||||||
s += x
|
s += x
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -429,7 +429,7 @@ func checkBinaryExpression(b *ast.BinaryExpr, e *state) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
if b1, ok := b.Y.(*ast.BinaryExpr); ok {
|
if b1, ok := b.Y.(*ast.BinaryExpr); ok {
|
||||||
if x := checkBinaryExpression(b1, e); x != "" {
|
if x := checkBinaryExpression(b1); x != "" {
|
||||||
s += x
|
s += x
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,8 +122,8 @@ func (mgr *Manager) run(ctx context.Context, t controller, ready, check, done ch
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mgr *Manager) cleanup(t controller) *Status {
|
func (mgr *Manager) cleanup(t controller) {
|
||||||
return t.cleanup()
|
t.cleanup()
|
||||||
}
|
}
|
||||||
|
|
||||||
// CleanupNotRunningTunnels cleans up tunnels that are not running
|
// CleanupNotRunningTunnels cleans up tunnels that are not running
|
||||||
|
|
Loading…
Reference in New Issue