You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a project using the new stackforms command cy create-stackforms-env -> create-env.go I added logic to fetch the defaults values first to merge them with the values provided by the user.
The merge doesn't happend because the lib i'm using (mergo) can merge only 2 similar structs.
The DefaultValues are recovered from the common.ParseFormsConfig() function that take a *model.FormUseCase and return a map[string]map[string]map[string]any (which is the format expected for a vars input for stackforms).
The vars variable is a map[string]interface{} and so, since it's not the same type as DefaultValues it doesn't merge the values.
We need to use the same types for both, this means changing the vars type, but it will require to refactor the common.UpdateMapField()function that is used to apply the -V args. This function is also related to this issue.
The text was updated successfully, but these errors were encountered:
When creating a project using the new stackforms command
cy create-stackforms-env
-> create-env.go I added logic to fetch the defaults values first to merge them with the values provided by the user.The merge doesn't happend because the lib i'm using (mergo) can merge only 2 similar structs.
On this line:
The
DefaultValues
are recovered from thecommon.ParseFormsConfig()
function that take a *model.FormUseCase and return amap[string]map[string]map[string]any
(which is the format expected for a vars input for stackforms).The
vars
variable is amap[string]interface{}
and so, since it's not the same type asDefaultValues
it doesn't merge the values.We need to use the same types for both, this means changing the
vars
type, but it will require to refactor thecommon.UpdateMapField()
function that is used to apply the-V
args. This function is also related to this issue.The text was updated successfully, but these errors were encountered: