summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-25 13:52:15 -0400
committerGitHub <noreply@github.com>2022-04-25 13:52:15 -0400
commit6984a0f35704204fa15374aa2c133c4e6e0b366f (patch)
tree21a070f1b03cba0109065ca62799511db389c52c /cmd/podman
parent09ef4f2e226c0bd769c93817fa5a4df1a9bb9f8b (diff)
parent62f4ae98fb73065063c05f45663b1fadbcb269c9 (diff)
downloadpodman-6984a0f35704204fa15374aa2c133c4e6e0b366f.tar.gz
podman-6984a0f35704204fa15374aa2c133c4e6e0b366f.tar.bz2
podman-6984a0f35704204fa15374aa2c133c4e6e0b366f.zip
Merge pull request #13999 from Luap99/go1.18-deprecated
[CI:DOCS] fix staticcheck linter warning for deprecated function
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/containers/ps.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go
index 91bb9bdb7..4adae30c2 100644
--- a/cmd/podman/containers/ps.go
+++ b/cmd/podman/containers/ps.go
@@ -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