Reputation: 99
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
Upvotes: 0
Views: 155
Reputation: 1328202
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,
Upvotes: 1