Skip to content

Conversation

@gucio321
Copy link
Collaborator

@gucio321 gucio321 commented Nov 6, 2024

What is this?
currently, gengo.go (and randomly other files) have various maps with hardcoded strings.
The purpose of this change is, to move all of them and store as a single object.
I've decided to split this into 2 parts:

  • presets.go contains a go struct. Its instance is stored inside of a Context.
  • cimgu-go-preset.json contains actual values compatible with cimgui-go.

Why?

  • To put everything hard-coded in 1 place
  • To make our codegen independent on hardcoded values (maybe someone will use it somewhere else?)

There is a new codegen -preset flag to set path for this json file.

@gucio321 gucio321 merged commit 951f023 into AllenDang:main Nov 6, 2024
5 checks passed
@gucio321 gucio321 deleted the codegen-presets branch November 6, 2024 16:31
@gucio321 gucio321 mentioned this pull request Nov 6, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant