hexlet-basics / exercises-go

GO
https://ru.code-basics.com/languages/go
18 stars 46 forks source link

Go: Строки Deprecated Method strings.Title #146

Closed s1ches closed 1 month ago

s1ches commented 4 months ago

Метод strings.Title deprecated, лучше

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

func Greetings(name string) string {
    name = strings.TrimSpace(strings.ToLower(name))

    caser := cases.Title(language.Russian)

    name = caser.String(name)
    return "Привет, " + name + "!"
}
kodsurfer commented 3 months ago

Please check my PR #148. Пожалуйста, проверьте мой PR #148.

kodsurfer commented 2 months ago

задача выполнена, может быть закрыта

fey commented 1 month ago

@sgmdlt