From 6aac05411070df1f493d728b0be38f24a5645c0c Mon Sep 17 00:00:00 2001 From: Anurag <86455065+theAnuragMishra@users.noreply.github.com> Date: Tue, 2 Dec 2025 01:58:50 +0530 Subject: [PATCH] feat(codegen): preserve casing of names by uppercasing only the first character instead of using strings.Title --- internal/codegen/golang/struct.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/codegen/golang/struct.go b/internal/codegen/golang/struct.go index ed9311800e..ec89845ea0 100644 --- a/internal/codegen/golang/struct.go +++ b/internal/codegen/golang/struct.go @@ -35,7 +35,9 @@ func StructName(name string, options *opts.Options) string { if _, found := options.InitialismsMap[p]; found { out += strings.ToUpper(p) } else { - out += strings.Title(p) + if len(p) > 0 { + out += strings.ToUpper(p[:1]) + p[1:] + } } }