Skip to content

Commit

Permalink
fix staticcheck linter warning for deprecated function
Browse files Browse the repository at this point in the history
Port of fix from podman-land:
containers/podman@62f4ae9

Thanks to [email protected] for figuring this out.

[NO NEW TESTS NEEDED]

Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Apr 27, 2022
1 parent d6babf0 commit 28b61dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/formats/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ var basicFunctions = template.FuncMap{
},
"split": strings.Split,
"join": strings.Join,
// 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
"title": strings.Title,
"lower": strings.ToLower,
"upper": strings.ToUpper,
Expand Down

0 comments on commit 28b61dc

Please sign in to comment.