SetCurrentContext and other context setters do not keep the struct up to date
An example of such issue is if I have a context that I got with c, err := config.GetCurrentContext(). I then change the user email in the config with c.SetContextKey("user_email", "[email protected]"). In order to get the updated context struct, I must call GetCurrentContext again, because the config was updated in the viper config file, but the data in the struct was not updated at the same time.
I'd like to keep this struct up to date as the context file changes so that this flow is no longer required. I believe that this makes a cleaner, more predictable dev experience.
original ticket - https://github.com/astronomer/cloud-cli/issues/268
@alex-astronomer is there an example of this happening in the code somewhere?