staticcheck: ignore SA1019: strings.Title is deprecated

This function is deprecated because it has known limitations when using
with multi-byte strings. This limitations are quite "corner case", and
our use (mostly) is for ASCII strings. The suggestion replacement brings
20k+ lines of code, which is a bit too much to fix those corner cases.

    templates/templates.go:23:14: SA1019: strings.Title is deprecated: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead. (staticcheck)
        "title":    strings.Title,
                    ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit bf29b40a8c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-03-27 22:15:42 +02:00
parent b3022b91d1
commit 86bf1966e2
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ var basicFunctions = template.FuncMap{
},
"split": strings.Split,
"join": strings.Join,
"title": strings.Title,
"title": strings.Title, //nolint:staticcheck // strings.Title is deprecated, but we only use it for ASCII, so replacing with golang.org/x/text is out of scope
"lower": strings.ToLower,
"upper": strings.ToUpper,
"pad": padWithSpace,