Skip to content

Commit

Permalink
hexlet-basics#146 replace deprecated strings.Title to cases.Title
Browse files Browse the repository at this point in the history
  • Loading branch information
kodsurfer authored Jul 26, 2024
1 parent 4b59068 commit 389c20f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/20-array-slice-map/20-for-loop/solution_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package solution

import (
"golang.org/x/text/cases"
"golang.org/x/text/language"
"strings"
"testing"

Expand All @@ -10,7 +12,7 @@ import (
func TestMap(t *testing.T) {
a := assert.New(t)
testMap(a, []string{"John", "Peter", "Fedor"}, []string{"john", "peter", "fedor"}, func(s string) string {
return strings.Title(s) //nolint
return cases.Title(language.English).String(s)
})
testMap(a, []string{"hello", "world"}, []string{"HELLO", "WORLD"}, func(s string) string {
return strings.ToLower(s)
Expand Down

0 comments on commit 389c20f

Please sign in to comment.