2
我无法让我的golang prog通过新贵运行。无法通过Upstart启动Golang Prog
这里是我的凸出dir--
/go
/src
/print.io
/geo
main.go
/geodomain
[.. files ..]
我有我的GOPATH设置为/go
DIR以上。
在/geo
文件夹内我可以运行go run main.go
,它的工作原理。
然而,以下新贵配置其日志main.go:8:2: import "print.io/geodomain": cannot find package
-
为什么犯规从暴发户工作时,我手动运行该命令喜欢它呢?
description "go-server"
author "micah smith"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [!2345]
respawn
script
chdir ~/go/src/print.io/geo/
exec go run main.go
end script
如果你cd到'geo'目录然后运行'go run main.go',它会工作吗? –
@deft_code是的它的确如此 – Micah
有没有可能通过Upstart调用'GOPATH'没有设置?尝试编译你的程序('go build')并将其放在你正常的'PATH'上。 –