I do not have a strong background in batch scripts, so apologies if there is an obvious answer.
I am trying to direct the output of a command prompt to a variable. I can output it to a file like this
go test -race > output.txt
In this case, output.txt gets populated with the output of go test -race. What I am trying to do is output it to a variable, something along the lines of
set iamavariable=nothotdog
go test -race > %iamavariable%
echo %location%
This creates a file called nothotdog that has the output of go test -race, and echoes nothotdog, instead of echoing the output of go test -race