Skip to content

Commit c0d7000

Browse files
go-mezkyleconroy
authored andcommitted
resolve conversation
1 parent 34e3bf4 commit c0d7000

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/.idea/
22
__pycache__
3+
.DS_Store

internal/codegen/golang/field.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,9 @@ func toCamelInitCase(name string, initUpper bool) string {
8686
}
8787

8888
func toLowerCase(str string) string {
89-
var b strings.Builder
90-
91-
b.WriteString(strings.ToLower(string(str[0])))
92-
b.WriteString(str[1:])
89+
if str == "" {
90+
return ""
91+
}
9392

94-
return b.String()
93+
return strings.ToLower(str[:1]) + str[1:]
9594
}

0 commit comments

Comments
 (0)