dongshuao2309 2019-02-12 22:05
浏览 149

通过jenkins部署go应用程序

I just created two EC2 instances, one with Jenkins and one for the go application.

I managed to create a node and a job that works together, and after starting the job for building the go application, I get the go files inside the workspace folder.

and I don't understand what I need to do from now. I can't run go run server.go because it's doesn't in the go src folder so I am getting an error that the namespace doesn't exist.

This is the error i get:

server.go:7:2: cannot find package "freelancers/daos" in any of:
    /usr/lib/golang/src/freelancers/daos (from $GOROOT)
    /home/ec2-user/projects/src/freelancers/daos (from $GOPATH)
  • 写回答

1条回答 默认 最新

  • drq1257 2019-02-12 23:23
    关注

    Set you environment correctly https://github.com/golang/go/wiki/SettingGOPATH

    Make sure package "freelancers/daos" is downloaded correctly to right path.

    Run and check your go env settings

    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序