Bind Struct for read as well
Is your feature request related to a problem? Please describe.
Say:
I have a config that contains data required by the Frontend, for example a key or an API URL. This is static and defined using config files in the go side (set via menu and dialogs).
I try to use a function and call it later but the promise nature of it makes it actually available too late. I could modify the FE code accordingly but that's a major change that won't work for other targets like web or PWA
Describe the solution you'd like
Ability to bind a struct as readonly for example. A pure data structure on the FE side.
Alternatively the same as now, however with a getter as well (right now only a setter is generated).
Describe alternatives you've considered
I have to do one build per API/Key pair, not scalable :)
I am pretty sure however it is possible already but I may have missed it completely :)
Additional context
No response
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@pierrejoye could you please provide another example of what you want as it isn't clear to me. Thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
example: go:
type App struct{
Data string
}
js:
console.log(App.Data)
How about a map[string][string] in Go that's always available at window.CustomState or something?