Hello,
I have the following code which is called by a handler at port 8002 at “/api”
https://play.golang.org/p/xFx4DfLpjsV
The handler function opens a JSON file called rubrik_locations at line 56, which contains the following test content:
"rubrik" : [
{
"site": {
"server": "https://postman-echo.com/get?foo1=bar1&foo2=bar2"
}
},
{
"site": {
"server": "https://postman-echo.com/get?foo1=bar1&foo2=bar2"
}
}
],
"index": 1
}
The idea behind the code is to pass the “server” parameter to the real URLs in a loop every time the URL with the host is passed in the browser:
http://localhost:8002/api/test.com
The issue that I’m having is that the call gets stuck when it starts the loop (never stops loading, keeps spinning) and does not go further down or print anything in the “Output” struct that I have at line 110, where the slice interface should have been passed the results from “resps” channel:
output := Output{
Success: true,
Vm: slice,
LogOutput: "Returned information location for host: " + server,
}