upstart経由でgolangプログラムを実行できません。
これが私のプロジェクトディレクトリです--
/go
/src
/print.io
/geo
main.go
/geodomain
[.. files ..]
上記のディレクトリにgopathを設定してい/goます。
/geoフォルダ内で実行でき、動作go run main.goします。
ただし、次のupstart構成では、ログが記録されます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