[go-nuts] Re: odd benchmark results for time.Now() call inside vs outside mutex

2020-02-24 Thread Jim Robinson
That's interesting! My numbers earlier were from an AMD chip (2990WX) on Linux 5.3.11. On an older Intel chip (i7-4960HQ) on macOS 10.15.3 I still see small a difference but it's much smaller. $ go test -bench . goos: darwin goarch: amd64 BenchmarkStateSet1-82737468 441 ns/op

[go-nuts] odd benchmark results for time.Now() call inside vs outside mutex

2020-02-24 Thread Jim Robinson
Hi folks, I was testing some code and I noticed something that struck me as little odd. In the following code: https://play.golang.org/p/z8OOCrnZ85s we have routines Set1, Set2, and Set3. They do the same thing, but change where time.Now().Unix() is called. Set1 calls for the time before it

Re: [go-nuts] Do Any Editors Support Customisable Code collapsing?

2019-07-18 Thread Jim Robinson
Is it named try? :P On Wednesday, July 17, 2019 at 8:37:53 PM UTC-7, Michael Jones wrote: > > There is a special “collapse if err != nil blocks plugin for VS code. > > On Wed, Jul 17, 2019 at 5:37 PM > wrote: > >> Context: >> 1. Golang can be very verbose, for example checking if err != nil afte

Re: [go-nuts] goxpath: An XPath 1.0 parser

2017-06-14 Thread Jim Robinson
Since he was the initial author of this thread you're replying to, it does seem reasonable enough to also raise the question here. :) On Wednesday, June 14, 2017 at 7:25:08 AM UTC-7, Lutz Horn wrote: > > Hi, > > Am 14.06.2017 15:57 schrieb seamus via golang-nuts: > > Yes referring to https://gi

Re: [go-nuts] Minio cloud storage?

2017-06-05 Thread Jim Robinson
or memory leaking? On Friday, June 2, 2017 at 3:14:53 PM UTC-7, cynexit.x wrote: > > On 06/02/2017 11:36 PM, Jim Robinson wrote: > > Have any of you folks made use of it? > > Indeed I have. So far only on a single node in the non-cluster mode but > it worked very well and

[go-nuts] Minio cloud storage?

2017-06-02 Thread Jim Robinson
The https://www.minio.io/ project looks very interesting. It's an S3 compatible cloud storage server (and associated apis and command line clients), written in Go. Have any of you folks made use of it? Jim -- You received this message because you are subscribed to the Google Groups "golang

[go-nuts] Re: go1.8 and json.NewDecoder(resp.Body)

2017-05-23 Thread Jim Robinson
I'd suggest the latter, drain the reader as the last step. Perhaps define a DrainReadCloser that can fully drain the input ReadCloser as part of its closing operation? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this g

[go-nuts] Re: TAR max file name woes

2017-05-09 Thread Jim Robinson
It looks to me as though the Writer specifically only handles the posix standard tar, which does indeed limit you to 100 characters. It appears as though they've implemented support for reading the GNU format, which I think does not place limits on the name length. See https://github.com/gola

[go-nuts] Re: text/scanner: scan() vs peek()

2016-08-25 Thread Jim Robinson
I'll admit to not understanding how your question and code example mesh, but as far as I can tell Scanner.Peek is working as it is documented in the API, it returns the rune w/o advancing: https://play.golang.org/p/DgzRcWeTRI -- You received this message because you are subscribed to the Googl