bump golangci-lint to v1.45.0

pull/13811/head
Predrag Rogic 2022-03-18 19:57:22 +00:00
parent 3f25d3ec4f
commit deb5a574b6
No known key found for this signature in database
GPG Key ID: F1FF5748C4855229
3 changed files with 7 additions and 3 deletions

View File

@ -76,7 +76,7 @@ MINIKUBE_RELEASES_URL=https://github.com/kubernetes/minikube/releases/download
KERNEL_VERSION ?= 4.19.202
# latest from https://github.com/golangci/golangci-lint/releases
# update this only by running `make update-golint-version`
GOLINT_VERSION ?= v1.44.2
GOLINT_VERSION ?= v1.45.0
# Limit number of default jobs, to avoid the CI builds running out of memory
GOLINT_JOBS ?= 4
# see https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint

View File

@ -43,6 +43,8 @@ import (
gopshost "github.com/shirou/gopsutil/v3/host"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"k8s.io/klog/v2"
cmdcfg "k8s.io/minikube/cmd/minikube/cmd/config"
@ -108,7 +110,7 @@ func platform() string {
// Show the distro version if possible
hi, err := gopshost.Info()
if err == nil {
s.WriteString(fmt.Sprintf("%s %s", strings.Title(hi.Platform), hi.PlatformVersion))
s.WriteString(fmt.Sprintf("%s %s", cases.Title(language.Und).String(hi.Platform), hi.PlatformVersion))
klog.Infof("hostinfo: %+v", hi)
} else {
klog.Warningf("gopshost.Info returned error: %v", err)

View File

@ -24,6 +24,8 @@ import (
"strconv"
"strings"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"k8s.io/klog/v2"
"k8s.io/minikube/pkg/drivers/kic/oci"
"k8s.io/minikube/pkg/minikube/constants"
@ -221,7 +223,7 @@ func FullName(name string) string {
}
return "Docker"
default:
return strings.Title(name)
return cases.Title(language.Und).String(name)
}
}