-
Notifications
You must be signed in to change notification settings - Fork 0
fix: make stock trading stub explicit with demo data #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d1288f2
5d24c63
e0b583b
ef65aa1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -354,17 +354,35 @@ func ensureConnectorConnected(ctx context.Context, connector module.IntegrationC | |
| } | ||
|
|
||
| // resolveParamValue resolves a single input value, substituting step result references where applicable. | ||
| // References use the ${varName} syntax. If the variable is not found, the original value is returned. | ||
| // References use the ${varName} syntax. Dot-notation is supported: ${step1.value} looks up results["step1"] | ||
| // and then retrieves the "value" key from the resulting map. If the variable is not found, the original value is returned. | ||
| func resolveParamValue(v any, results map[string]any) any { | ||
| strVal, ok := v.(string) | ||
| if !ok || len(strVal) <= 3 || strVal[0:2] != "${" || strVal[len(strVal)-1] != '}' { | ||
| return v | ||
| } | ||
| // Extract the variable name, e.g., ${step1.value} -> step1.value | ||
| varName := strVal[2 : len(strVal)-1] | ||
| // Fast path: exact match in results | ||
| if result, found := results[varName]; found { | ||
| return result | ||
| } | ||
| // Dot-notation path: split on "." and traverse nested maps | ||
| parts := strings.SplitN(varName, ".", 2) | ||
| if len(parts) != 2 { | ||
| return v | ||
| } | ||
| stepResult, found := results[parts[0]] | ||
| if !found { | ||
| return v | ||
| } | ||
| nested, ok := stepResult.(map[string]any) | ||
| if !ok { | ||
| return v | ||
| } | ||
| if val, found := nested[parts[1]]; found { | ||
| return val | ||
| } | ||
| return v | ||
| } | ||
|
Comment on lines
356
to
387
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
net/httpimport was removed, but the code still referenceshttp.Clienton lines 65 and 73 within the embedded GoCode string. This will cause a compilation error when the generated code is used. Either keep thenet/httpimport or remove thehttpClientfield from the struct.