mirror of
https://github.com/containers/podman
synced 2024-10-19 16:54:07 +00:00
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>
This commit is contained in:
parent
9784d97bd6
commit
62f4ae98fb
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue