我可以将第三方软件包导入golang游乐场吗? [英] Can I import 3rd party package into golang playground
问题描述
Go Playground链接: https://play.golang.org/
Go Playground上最完整的文章仍然是 Go Go Playground内部,其中提到:
-
godoc / static / static.go
(用于游乐场中显示的默认程序) //github.com/golang/tools/tree/master/playgroundrel =nofollow noreferrer> -
iafan / goplayspace
-
xiam / go-playground
godoc/static/static.go
(for the default go program displayed in the playground)golang/tools/playground
for the sources, withplayground/socket/socket.go
building and executing the program from the playground editor.
golang / tools / playground
playground / socket / socket.go
构建并执行pro这些进程不支持导入一个远程包(可以通过互联网访问)。 > 这是一个非常独立的系统(您可以在本地运行,也可以在play.golang.org中使用它),并具有多个功能,如网络:
像文件系统一样,操场的网络堆栈是一个由syscall包实现的进程内伪造。
它允许游乐场项目使用回环接口(127.0.0.1)。
对其他主机的请求将失败。
更新2017:
您有其他选择:
但他们仍然使用官方Go Playground服务来构建和运行Go代码,因此仍然不允许外部导入。
I googled but got no answer. Is it possible? If yes, how to do it?
The Go Playground link: https://play.golang.org/
The most complete article on Go Playground remains "Inside the Go Playground", which mentions:
None of those processes support importing a remote package (that would be accessed over the internet).
It is very much a self-contained system (that you can run locally as well as using it from play.golang.org), with multiple features stubbed or faked, like the network:
Like the file system, the playground's network stack is an in-process fake implemented by the syscall package.
It permits playground projects to use the loopback interface (127.0.0.1).
Requests to other hosts will fail.
Update 2017:
You have alternatives:
But they still use use the official Go Playground service to build and run Go code, so that would still not allow for external imports.
这篇关于我可以将第三方软件包导入golang游乐场吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!