如何在Google Colaboratory中运行Golang

Now Google Colaboratory supports Python2 and Python3 kernels. Can I add a Golang kernel so that I can use Golang in Colab too?

I found a few examples here, but it only has JavaScript and R, no Golang.

First, you need to install the Golang kernel (gophernotes) from a normal Python notebook.

!apt install golang-go libzmq3-dev
%env GOPATH=/root/go
!go get -u github.com/gopherdata/gophernotes
!cp ~/go/bin/gophernotes /usr/bin/
!mkdir /usr/local/share/jupyter/kernels/gophernotes
!cp ~/go/src/github.com/gopherdata/gophernotes/kernel/* \
       /usr/local/share/jupyter/kernels/gophernotes

Then make a copy of this go_1+1.ipynb notebook and run it.