Parsing resource content $res
Hi there, I am using windmill v1.513.1 and I define an Input which has type array and item type "Items are resources". Now, the ressources are passed to the next step as something like "$res:/path/to/resource". This $res is breaking everything. Is it intended to appear and how do I parse the resource in a subsequent script using the go-library's GetResource(string) ? Thanks for hints
3 Replies
when you pass an argument as $res:X, it gets interpolated before being passed to the script itself
so you get the value of the resource instead
but it's possible that we do not handle that well in Go however
When I make a simple flow with an input and a go-script jsut doing GetResource, then I get "json: cannot unmarshal array into Go struct field Req.x of type string"
I think the reason is that the input is passing "$res:/path/to/resource"
Even in the json-view of the input you can see this $res which is being given to the subsequent script.
