Example: "autoconfig", use reflection to make an automatic GUI to edit any struct #286
mappu
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was working on a larger app and found myself writing a lot of glue code to edit settings. Most of it is the same.
So - why not do it automatically?
https://github.com/mappu/autoconfig can instantly edit any struct. You can fill in fields, interactively add/remove elements from slices, and so on.
If you want to use it deeply, there are extra types in the package for "a file", "a directory", "password", and so on that will produce specific widgets in the UI. That's done as an interface that you can implement yourself as well.
Beta Was this translation helpful? Give feedback.
All reactions