Golang - reuse previously created executables if the code has not changed

I have a rather large golang project that creates several executables, when I update my code, I need a simple and quick way to rebuild all of them, however it takes ~ 20-25 seconds to create them, and most of the time I only change 1 or 2

The ultimate goal is to determine what has changed and rebuild only the changed goals as quickly as possible (CI)

ps some parts of the project use cgo, and it takes 40-50% of the build time

+4
source share
1 answer

From the top level of your project

go install ./...

You must install all the binaries in $ GOPATH / bin

go install ( go build), , .

+6

Source: https://habr.com/ru/post/1628354/


All Articles