Is it possible to use a Go build with additional build steps?

What to do when go build is not enough and they need to run additional commands along with go build? Are there any tools covered by this use case? If so, what is the agreement?

I noticed that you can pass additional flags to create tools:

//#cgo pkg-config: glib-2.0 gobject-2.0 etc etc
import "C"

Is it possible to run additional commands, or at least tell go build to use the Makefile?

+4
source share
2 answers

No. The go tool is not intended to create a common build system. There are some provisions made for cgo (e.g. pkg-config), but they are not extensible.

go1.4 generate. , , . go get, go build go install.

, , script Makefile go get. get -able dependecy.

+3

, .

pkg-config - .

make , go .

+1

All Articles