如何使用golang打印到浏览器控制台中[重复]

This question already has an answer here:

i am using golang to develop my small web app and i just wanted to know are there are any ways in golang from which i can print anything into browser console.

I am using Go version go1.7.4 linux/amd64.

Here i just want to print some values for example redirect url's into web browser's console enter image description here

</div>

No.

Go doesn't run in your browser (unless you're using GopherJS or similar), so there's no way for Go to write to your browser's console. You must do that from JavaScript.