[go-nuts] buffered io.ReaderAt

2017-09-16 Thread Sebastien Binet
hi there, I know about bufio.Reader that provides a buffered version of an io.Reader. Has anybody written a buffered version of an io.ReaderAt ? I have this binary file format that implicitly forces decoders of said format to fetch data using ReadAt. In C/C++, that's OK because files are open

Re: [go-nuts] Re: Confusion about C++ calling go

2017-09-16 Thread wolfkdy1989
another important tip: My c++ program forked to daemonlize. The golang-part is first called in the third child process(the standard daemonlize procedure forks twice). If I don't daemonlize my program, the go-gc won't hang.So strange. 在 2017年9月16日星期六 UTC+8下午4:31:25,wolfk...@gmail.com写道: > >

Re: [go-nuts] Using commercial SSL certificate with golang server?

2017-09-16 Thread Simon Ritchie
> Is there a particular directory where I should keep the certificate? That's defined in your program. If you write it yourself, it's up to you. You can find a small worked example of a program that uses a certificate here: https://github.com/goblimey/grpc. Regards Simon On Friday,

Re: [go-nuts] Re: Confusion about C++ calling go

2017-09-16 Thread wolfkdy1989
I found golang gc will hang when started from a daemonlized c++ program. But fine if not daemonlized. 在 2017年9月13日星期三 UTC+8上午1:22:35,Ian Lance Taylor写道: > > On Tue, Sep 12, 2017 at 9:52 AM, > wrote: > > > > To be precise, I want to know if the garbage-collection thread

Re: [go-nuts] buffered io.ReaderAt

2017-09-16 Thread Jan Mercl
On Sat, Sep 16, 2017 at 1:52 PM Sebastien Binet wrote: > Has anybody written a buffered version of an io.ReaderAt ? IIUC what's needed, you might want to try https://github.com/cznic/file/blob/efffc965e97bbf31b0ed00deb82fe697500f22b5/file.go#L1039 -- -j -- You received

Re: [go-nuts] Re: Confusion about C++ calling go

2017-09-16 Thread wolfkdy1989
golang 1.6, when I start from C++ entry and call into a static-lib written by go, the program hangs in gc #0 runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:303 #1 0x012004d3 in runtime.futexsleep (addr=0x23da788 , val=0, ns=-1) at

[go-nuts] Re: context cancellation flake

2017-09-16 Thread Tamás Gulácsi
No, but may cancel the reading before completion. -- 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,

[go-nuts] [ANN] jsondoc - helps document HTTP/REST JSON APIs

2017-09-16 Thread Łukasz Pankowski
Hi, I released jsondoc a command line tool used to simplify creation of documentation of HTTP (REST) JSON APIs for projects written in Go. The input and/or output JSON structure for particular endpoints is obtained from named types from selected Go packages. The output of jsondoc is an HTML file

[go-nuts] Re: context cancellation flake

2017-09-16 Thread Steven Lee
Does calling the cancel func on a context that is attached to a http.Request change the contents of the body to context cancellation? On Friday, 15 September 2017 18:15:25 UTC+1, Steven Lee wrote: > > Hello, > > I was wondering if anyone could help me with understanding the behaviour > of

Re: [go-nuts] buffered io.ReaderAt

2017-09-16 Thread Sebastien Binet
ah! I thought I had scrutinized your repos for such a thing (you usually have quite the gems over there) but overlooked that one. thanks. sadly, the improvement wasn't impressive (probably a testimony to the performances of the linux filesystem layer...) copying the whole file's content into a

[go-nuts] Re: Go on ARM 32bit and 64bit resources and groups

2017-09-16 Thread Dave Cheney
I think it's fine to ask questions about 32bit implementations of Go here. For Go specific things like interfacing with hardware https://gobot.io/ or https://periph.io/ may be better choices. On Sunday, 17 September 2017 06:21:45 UTC+10, Norbert Fuhs wrote: > > Hi, > > since I'm running Go on

Re: [go-nuts] Go on ARM 32bit and 64bit resources and groups

2017-09-16 Thread Ranjib Dey
Is there anything specific you are looking for ? I extensively use go on pi and pretty much everything is very similar, i develop on my mac book and CI cluster deploys it. On non arm arch, its just as simple as setting up GOARCH and GOARM variables... thats all I have a whole build/ci stack as

[go-nuts] Re: context cancellation flake

2017-09-16 Thread Steven Lee
I guess thats plausible Ive tried to find the code in the library that sets the body if a context is cancelled but cant, I understand how to fix the code just struggling to understand the mechanics and especially why it flakes :( -- You received this message because you are subscribed to the

[go-nuts] Re: context cancellation flake

2017-09-16 Thread silviucapota
Hi Steven, In case it's still unclear, you need to wrap both the "do request" + "read body" inside the same cancellation context. The "defer cancel" should encompass both of them, sort of atomically, so the idea is to take it out of your fetch, one level up.

[go-nuts] Go on ARM 32bit and 64bit resources and groups

2017-09-16 Thread Norbert Fuhs
Hi, since I'm running Go on an Rapberry Pi 3 I would like to know if there are more official resources / tutorials or even groups? Beside doing searching for arm on Github https://github.com/golang/go/search?utf8=%E2%9C%93=arm= Is the only offical resource I found is Go s wiki page: