Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
s1ches opened this issue Jun 29, 2024 · 3 comments
Closed

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

s1ches opened this issue Jun 29, 2024 · 3 comments

Comments

@s1ches
Copy link

s1ches commented Jun 29, 2024

Метод 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 added a commit to kodsurfer/exercises-go that referenced this issue Jul 26, 2024
kodsurfer added a commit to kodsurfer/exercises-go that referenced this issue Jul 26, 2024
kodsurfer added a commit to kodsurfer/exercises-go that referenced this issue Jul 26, 2024
@kodsurfer
Copy link
Contributor

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

sgmdlt added a commit that referenced this issue Aug 7, 2024
@kodsurfer
Copy link
Contributor

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

@fey
Copy link
Contributor

fey commented Sep 5, 2024

@sgmdlt

@sgmdlt sgmdlt closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants