SetVariable
Adds or updates a variable in a VariableMap. If the key already exists, it updates the value. Otherwise, it appends a new entry.
def SetVariable(
vm: *core.VariableMap,
key: string,
variable: *core.Variable
)
Adds or updates a variable in a VariableMap. If the key already exists, it updates the value; otherwise, it appends a new entry.
Parameters
| Name | Type | Description |
|---|---|---|
| vm | *core.VariableMap | The VariableMap to which the variable will be added or updated. |
| key | string | The unique identifier for the variable within the VariableMap. |
| variable | *core.Variable | The variable object to be stored or updated in the VariableMap. |