Skip to content

Commit 764afd3

Browse files
committedMay 6, 2023
update
1 parent 77946d8 commit 764afd3

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed
 

‎internal/sdk/utils.go

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ func Stem(s string) string {
3636
}
3737

3838
func ToSnakeCase(s string) string {
39-
if s == "ID" {
40-
return "id"
41-
}
4239
return strcase.SnakeCase(s)
4340
}
4441

‎result.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,7 @@ func columnName(c *plugin.Column, pos int) string {
180180
}
181181

182182
func argName(name string) string {
183-
out := ""
184-
for i, p := range strings.Split(name, "_") {
185-
if i == 0 {
186-
out += strings.ToLower(p)
187-
} else {
188-
out += strings.Title(p)
189-
}
190-
}
191-
return out
183+
return sdk.ToLowerCamelCase(name)
192184
}
193185

194186
func paramName(p *plugin.Parameter) string {

0 commit comments

Comments
 (0)
Please sign in to comment.