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

fix: strings.Title -> cases.Title bcs strings.Title library is deprecated #6999

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ryuji-cre8ive
Copy link

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

change using library strings.Title to cases.Title because of strings. Title is deprecated for Go 1.18
below is a warnings when I run golangci-cli:

strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.

I rewrite strings.Title -> cases.Title.
cases.TItle returns a Caser so it needed to parse to string because strings.Title returns string

cases.Title can be taken language, but I don't know which language supports for gorm so I tried to write language.Und.
this means you didn't decide which language.

User Case Description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant