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

strings.Title has been deprecated since Go 1.18 #454

Closed
orpheuslummis opened this issue May 17, 2022 · 2 comments · Fixed by #457
Closed

strings.Title has been deprecated since Go 1.18 #454

orpheuslummis opened this issue May 17, 2022 · 2 comments · Fixed by #457
Assignees
Labels
code quality Related to improving code quality
Milestone

Comments

@orpheuslummis
Copy link
Contributor

Running the linter using Go 1.18 leads to

query/graphql/schema/generate.go:563:44: SA1019: 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. (staticcheck)
                        Name: fmt.Sprintf("%s%s%s", obj.Name(), strings.Title(field.Name), "CountInputObj"),
                                                                ^
query/graphql/schema/generate.go:683:57: SA1019: 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. (staticcheck)
                                Name: genNumericInlineArraySelectorName(obj.Name(), strings.Title(field.Name)),
                                                                                    ^
query/graphql/schema/generate.go:699:41: SA1019: 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. (staticcheck)
        return fmt.Sprintf("%s%s%s", hostName, strings.Title(fieldName), "NumericInlineArraySelector")
@orpheuslummis orpheuslummis added the code quality Related to improving code quality label May 17, 2022
@orpheuslummis orpheuslummis added this to the DefraDB v0.3 milestone May 17, 2022
@orpheuslummis
Copy link
Contributor Author

golang/go#48367

@orpheuslummis
Copy link
Contributor Author

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

Successfully merging a pull request may close this issue.

1 participant