Skip to content

Commit

Permalink
fix(utils): fix the counting logic of duplicate names (#401)
Browse files Browse the repository at this point in the history
Co-authored-by: iawia002 <[email protected]>
  • Loading branch information
caicloud-bot and iawia002 authored Nov 26, 2020
1 parent 0d6664b commit fb150fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/generators/golang/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,10 @@ func (n *nameContainer) proposeName(name string, typ api.TypeName) string {
name += "_"
}
index := n.names[name]
n.names[name]++
if index > 0 {
name += strconv.Itoa(index)
}
n.names[name]++
return name
}

Expand Down

0 comments on commit fb150fe

Please sign in to comment.