cleanup(services): xstrings v1.5.0 the CAMEL & PASCAL workarounds

Refs: https://codeberg.org/forgejo/forgejo/pulls/4050
This commit is contained in:
Earl Warren 2024-06-07 18:10:37 +02:00
parent 884eb07793
commit 0d69cda8bd
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -42,6 +42,8 @@ type expansion struct {
var defaultTransformers = []transformer{
{Name: "SNAKE", Transform: xstrings.ToSnakeCase},
{Name: "KEBAB", Transform: xstrings.ToKebabCase},
// as of xstrings v1.5.0 the CAMEL & PASCAL workarounds are no longer necessary
// and can be removed https://codeberg.org/forgejo/forgejo/pulls/4050
{Name: "CAMEL", Transform: func(str string) string {
return xstrings.FirstRuneToLower(xstrings.ToCamelCase(str))
}},