FAQ
Try adding the -x flag when you run go run/build/install to see commands are being run.

At least on my machine, the first time I run 'go install -x .' it shows all the libraries that are not fresh being recompiled and cached in the $GOPATH/pkg directory. Later when changing just the main func and re-running with 'go run -x main.go' (or build) only the main package is recompiled, all other libraries have their cached version used. If you change a library you import go build/run will always recompile it but not cache it. As others have said, use go install to get the caching functionality.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 10 of 10 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 13, '15 at 8:02p
activeFeb 15, '15 at 6:16p
posts10
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase