From 884eb07793c313bee1c3f4f9e9acfb5be7d05b37 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 7 Jun 2024 00:05:55 +0000 Subject: [PATCH 1/2] Update module github.com/huandu/xstrings to v1.5.0 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 25cdd1be19..addf38b5ba 100644 --- a/go.mod +++ b/go.mod @@ -62,7 +62,7 @@ require ( github.com/h2non/gock v1.2.0 github.com/hashicorp/go-version v1.6.0 github.com/hashicorp/golang-lru/v2 v2.0.7 - github.com/huandu/xstrings v1.4.0 + github.com/huandu/xstrings v1.5.0 github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056 github.com/jhillyerd/enmime v1.2.0 github.com/json-iterator/go v1.1.12 diff --git a/go.sum b/go.sum index 170f704f3d..0c435c6ca0 100644 --- a/go.sum +++ b/go.sum @@ -412,8 +412,8 @@ github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUq github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= -github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= +github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= From 0d69cda8bdffd557e7172c2d09e7eeb77ca5a94e Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 7 Jun 2024 18:10:37 +0200 Subject: [PATCH 2/2] 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)) }},