Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Tim K
gofmt documentation says: Gofmt formats Go programs. It uses tabs (*width = 8*) for indentation and > blanks for alignment. > https://golang.org/cmd/gofmt/ Just curious, any reason why it needs to specify the tab width = 8? Should that be removed if it's not relevant? Thanks! On Sunday, Mar

Re: [go-nuts] memory gc when slice shortcut

2017-03-09 Thread Tim K
On Thursday, March 9, 2017 at 2:48:05 AM UTC-8, Jan Mercl wrote: > > On Thu, Mar 9, 2017 at 11:45 AM 代君 > > wrote: > > > I have a []*Struct, at some times it length grow to 1000, after that, > the slice be shortcut to length of 10, and never grow to 1000 again. > > dose the memory of *Struct at

[go-nuts] Re: Can searchbox on golang.org be improved?

2016-12-15 Thread Tim K
Instant search would be nice, in particular for APIs. Google surely has the technology to improve the search box on golang.org Meanwhile, for API searches you can use: http://devdocs.io/go/ Or desktop apps such as Dash (Mac) or Zeal (Win/Linux). On Thursday, December 15, 2016 at 7:59:44 AM UTC

Re: [go-nuts] Re: do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
On Wednesday, September 28, 2016 at 2:31:44 PM UTC-7, andrey mirtchovski wrote: > > > If I want to start from the executables in $GOPATH/bin and recompile > only > > those, is there a way to tell what package an executable comes from so I > can > > easily automate the process? E.g. goimports

Re: [go-nuts] Re: do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
, 'go list all', and also > how to query individual folders inside GOPATH. > > "go build -i" will ensure that prerequisite library dependencies are > also installed, which will populate the entire pkg/* directory. > > On Wed, Sep 28, 2016 at 9:30 AM, Tim K >

[go-nuts] Re: do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
OK, so all that should happen is just re-install the binaries in $GOPATH/bin. Does anyone have any tips or helper scripts that help automate re-installing all these binaries? There's a pile of them which makes it a bit difficult to find out what exact package path they came from so they can be

[go-nuts] do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
If the Go toolchain is upgraded to a newer version, do the existing packages in $GOPATH need to be recompiled? If so, how? Just delete $GOPATH/pkg and go install everything? What about the binaries in $GOPATH/bin? What's the easiest way to make sure that everything in $GOPATH is compiled with t