Forcing go generate and reading the AST is limiting. It might be worth it to bite the bullet and create a config that can be constructed in both Go/JSON/X. I have done similar work in https://github.com/delaneyj/gostar
This can be run by task runners like Air or Taskfile as a dependency. Also means you can be much more explicit with the Select so you are defining Query in config and generating named functions, like the components. I've done some work in this vein for ECS and would be nice to swap notes.
Forcing go generate and reading the AST is limiting. It might be worth it to bite the bullet and create a config that can be constructed in both Go/JSON/X. I have done similar work in https://github.com/delaneyj/gostar
This can be run by task runners like Air or Taskfile as a dependency. Also means you can be much more explicit with the Select so you are defining Query in config and generating named functions, like the components. I've done some work in this vein for ECS and would be nice to swap notes.