Open vz250049 opened 11 months ago
Hey @vz250049,
I'm not sure I understand the problem you're trying to solve in the first place. I can suggest a few things that might help you:
jq
. ---
) and then split it using csplit
or awk
.If you still want to do it in a single step, writeOutput
function signature may look like this to accept a map of outputs:
func writeOutput(outputs map[string]string) error
Then, for each key in the map, call formatOutput
with the key and value and join the strings with a newline separator before writing to the file.
Alternative solution is to use list of outputs, depending on how you want to generate them, and generate output names automatically (result
, result2
, result3
, ...):
func writeOutput(outputs []string) error
Also, update action.yml
; otherwise some linters will complain about unknown outputs.
First off, this is really good stuff here.
Tried code with multiple outputs and it seems to negate both when I do it. 2 places where I call
writeOutput
hoping to set outputs and I get errors. See below.Changed function to:
func writeOutput(name string, output string) error {...}
can you help?