Skip to content

Commit

Permalink
Merge pull request #73 from gucio321/fix-enum-names
Browse files Browse the repository at this point in the history
codegen: trim trailing _ suffix in enums
  • Loading branch information
gucio321 authored Dec 31, 2022
2 parents 1ffcd20 + 15cb47c commit 584fdd8
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 58 deletions.
116 changes: 58 additions & 58 deletions cimgui_enums.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cmd/codegen/gengo.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func generateGoEnums(prefix string, enums []EnumDef) []string {

for _, v := range e.Values {
vName := trimImGuiPrefix(v.Name)
vName = strings.TrimSuffix(vName, "_")
sb.WriteString(fmt.Sprintf("\t%s = %d\n", vName, v.Value))
}

Expand Down

0 comments on commit 584fdd8

Please sign in to comment.