> Often, this involves incrementing the version [...]

If the process of saying "this binary is good to go, deploy it locally for 
use" already involve more than go install, maybe you could also "deploy" 
the binary to a different location than $GOPATH/bin . The benefit there is 
that you can take advantage of the incremental/faster compile of go 
install, without having a broken binary.

Unless that has other negative side effects in your own setup. But, if you 
are ok with the speed of go build, no need to change.



On Tuesday, April 18, 2017 at 1:02:03 PM UTC-4, Marvin Renich wrote:
>
> * Dave Cheney <da...@cheney.net <javascript:>> [170418 09:57]: 
> > > Apparently Dave Cheney says to prefer "go install" over "go build"[3], 
> > except when cross-compiling [4]. However, many of these posts are older, 
> > and Golang moves at such a rapid clip that it's difficult to keep track 
> of 
> > what everybody is doing. 
> > 
> > This information is still correct. 
> > 
> > On Friday, 10 February 2017 02:55:25 UTC+11, Jonathan Yu wrote: 
> > > 
> > > Hello Gophers! 
> > > 
> > > There's a fair amount of documentation available[0] about how "go 
> install" 
> > > works, particularly in contrast to "go build,"[1,2] but not a lot 
> about 
> > > which one is more idiomatic/preferred.  Using the standard toolchain, 
> it 
> > > seems there's three ways to build your applications: 
>
> I use "go build" in the "edit, build, test, repeat" cycle, and only use 
> go install when I have what I consider to be a working program.  Often, 
> this involves incrementing the version and adding a version tag to the 
> repo. 
>
> If I used go install during edit-test, I would often have a non-working 
> executable in my path, so I would not be able to use the program for 
> "real" work while I am knee-deep in a bug fix or implementing a new 
> feature. 
>
> Dave's mileage obviously varies from mine, which is fine.  However, I 
> believe my use case and reasoning is common enough that I believe it is 
> counterproductive to try to declare one way or the other to be "The 
> Idiomatic Way".  This just boils down to personal preference and work 
> flow, and trying to tell others that one way is the "preferred" way is 
> wrong. 
>
> ...Marvin 
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to