Skip to content

Commit

Permalink
minor efficiency improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Aug 12, 2022
1 parent 89e3a71 commit 88e3bd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codegen/templates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ func ToGoModelName(parts ...string) string {
}

// finally, fallback to just adding an incrementing number
base := applyToGo(parts)
for i := 0; ; i++ {
base := applyToGo(parts)
tmp := fmt.Sprintf("%s%d", base, i)
if !nameExists(tmp) {
modelNames[goNameKey] = tmp
Expand Down

0 comments on commit 88e3bd0

Please sign in to comment.