mirror of https://github.com/docker/cli.git
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>
This commit is contained in:
parent
5a1e151c02
commit
bf29b40a8c
|
@ -20,7 +20,7 @@ var basicFunctions = template.FuncMap{
|
||||||
},
|
},
|
||||||
"split": strings.Split,
|
"split": strings.Split,
|
||||||
"join": strings.Join,
|
"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,
|
"lower": strings.ToLower,
|
||||||
"upper": strings.ToUpper,
|
"upper": strings.ToUpper,
|
||||||
"pad": padWithSpace,
|
"pad": padWithSpace,
|
||||||
|
|
Loading…
Reference in New Issue