Merge pull request #13999 from Luap99/go1.18-deprecated

[CI:DOCS] fix staticcheck linter warning for deprecated function
This commit is contained in:
OpenShift Merge Robot 2022-04-25 13:52:15 -04:00 committed by GitHub
commit 6984a0f357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -363,6 +363,11 @@ func (l psReporter) State() string {
state = fmt.Sprintf("Exited (%d) %s ago", l.ExitCode, t)
default:
// Need to capitalize the first letter to match Docker.
// strings.Title is deprecated since go 1.18
// However for our use case it is still fine. The recommended replacement
// is adding about 400kb binary size so lets keep using this for now.
//nolint:staticcheck
state = strings.Title(l.ListContainer.State)
}
return state