From 0d69cda8bdffd557e7172c2d09e7eeb77ca5a94e Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 7 Jun 2024 18:10:37 +0200 Subject: [PATCH] cleanup(services): xstrings v1.5.0 the CAMEL & PASCAL workarounds Refs: https://codeberg.org/forgejo/forgejo/pulls/4050 --- services/repository/generate.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/repository/generate.go b/services/repository/generate.go index 9b09e271ab..5cb1471842 100644 --- a/services/repository/generate.go +++ b/services/repository/generate.go @@ -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)) }},