Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 18:04:24 +01:00

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{ var defaultTransformers = []transformer{
{Name: "SNAKE", Transform: xstrings.ToSnakeCase}, {Name: "SNAKE", Transform: xstrings.ToSnakeCase},
{Name: "KEBAB", Transform: xstrings.ToKebabCase}, {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 { {Name: "CAMEL", Transform: func(str string) string {
return xstrings.FirstRuneToLower(xstrings.ToCamelCase(str)) return xstrings.FirstRuneToLower(xstrings.ToCamelCase(str))
}}, }},