Upgrade go version to 1.18 (#5045)

* Upgrade go version to 1.18

* fix go 1.18 compatibility

* update gofmt

* ignore golangci-lint staticcheck

* update gofmt
This commit is contained in:
hongming
2022-07-18 10:42:48 +08:00
committed by GitHub
parent e529703c49
commit 521cb40c21
872 changed files with 109434 additions and 111219 deletions

View File

@@ -538,6 +538,7 @@ func (mo monitoringOperator) GetAppWorkloads(ns string, apps []string) map[strin
for _, appObj := range applicationList {
if appFilter(appObj) {
for _, com := range appObj.Status.ComponentList.Objects {
//nolint:staticcheck // TODO Use golang.org/x/text/cases instead.
kind := strings.Title(com.Kind)
name := com.Name
componentsMap[getAppFullName((appObj))] = append(componentsMap[getAppFullName(appObj)], kind+":"+name)

View File

@@ -942,6 +942,7 @@ func (t *tenantOperator) isAppComponent(ns, kind, componentName string) (bool, s
for appName, cList := range appWorkloads {
for _, component := range cList {
//nolint:staticcheck // TODO Use golang.org/x/text/cases instead.
if component == fmt.Sprintf("%s:%s", strings.Title(kind), componentName) {
return true, appName
}