diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-04-25 18:36:37 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-04-25 18:55:28 +0200 |
commit | 62f4ae98fb73065063c05f45663b1fadbcb269c9 (patch) | |
tree | 75f3882bc186b097b8116809e566043adf61d86f /cmd | |
parent | 9784d97bd6cef590de781575992f7a685ab1c2c2 (diff) | |
download | podman-62f4ae98fb73065063c05f45663b1fadbcb269c9.tar.gz podman-62f4ae98fb73065063c05f45663b1fadbcb269c9.tar.bz2 podman-62f4ae98fb73065063c05f45663b1fadbcb269c9.zip |
fix staticcheck linter warning for deprecated function
go1.18 deprecates `strings.Title()`. However for our use case this is
still fine. The recommended replacement is adding about 400kb binary
size so lets keep using this for now.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/containers/ps.go | 5 |
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 |