dsfs504545 2019-07-17 04:46
浏览 37

使用旧版本的子程序包运行

I'm trying out the Jaeger/OpenTracing tutorial and finding that none of my changes to the HotROD application code have any effect.

The project structure is something like (abridged):

├── main.go
├── pkg
└── services
    ├── config
    │   └── config.go
    ├── customer
    ├── driver
    ├── frontend
    └── route

I start the application by running go run main.go all. It behaves as expected, the traces on Jaeger all match the screenshots on Medium.

I edit services/config/config.go to change the RouteWorkerPoolSize and MySQLGetDelay variables as directed. Then stop the server and start it again with go run main.go all

I'd expect these changes to be reflected in the newly running server, but they aren't. The behaviour is the exact same as before. It's like go is running the old code.

Am I misunderstanding something about go run?

Environment variables:

GOPATH="/home/ronnie/go"
GOROOT="/usr/local/go"

working directory:

/home/ronnie/go/src/github.com/jaegertracing/jaeger/examples/hotrod

Go version 1.12.6 running on Kubuntu 18.04

  • 写回答

1条回答 默认 最新

  • drjun1994 2019-07-17 05:00
    关注

    go run compiles and runs the named main Go package.

    Only go build or go install would compile the packages named by the import paths, along with their dependencies,

    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘