I googled but got no answer. Is it possible? If yes, how to do it?
The Go Playground link: https://play.golang.org/
Since May 14th, 2019, it is now possible (from Brad Fitzpatrick)!
The #golang playground now supports third-party imports, pulling them in via https://proxy.golang.org/
I have not tried it myself but xiam/go-playground indicates that this is possible:
Importing custom packages
Remember that playground users won't be able to install or use packages that are not part of the Go standard library, in case you want to showcase a special package you'll have to create a slightly different docker image on top of the sandbox or the unsafebox...
(Followed by example of how to do this with a Dockerfile modification.)
This would seem to indicate that the compilation is (or at least can be) performed inside a custom sandbox as show in the xiam/go-playground project, thus making this possible (not requiring play.golang.org as indicated by @VonC's answer).
If I get a chance to test this myself I'll update this answer with more detail.