May I ask how to modify the version in the dashboard?

Viewed 61

Sorry for my English. When I run the binary file obtained through compiling the source code, I notice that the version in the dashboard is always 0.0.0. Could you kindly guide me on how to modify it to a specific version?

1 Answers

You can use make build command to build binary. BTW, It works by using -X$(VERSION) to specify the version number.

➜ answer (main) ✗ pwd       
➜ answer (main) ✗ go build -ldflags "-X" .
➜ answer (main) ✗ ./answer -v
answer version v1.2.5