[go-nuts] Download all dependencies using go get ./...

2016-12-18 Thread Peng Wang
I have a project that using golang.org/x/crypto/ssh, when I try to build it, i usually do a go get ./... command(since it's easy to remember for every project and shorter than go get golang.org/x/crypto/ssh), but then it reports cannot find package "golang.org/x/net/context/ctxhttp". It seems it

[go-nuts] Re: How many bytes binary.Write write before an error?

2016-12-16 Thread Peng Wang
OK, now I actually get it. Just use a CounterWriter and return bytes num it receives. Such writer already exists in the std lib? 在 2016年12月16日星期五 UTC+8下午2:10:41,P Q写道: > > 2016년 12월 16일 금요일 오전 11시 5분 53초 UTC+9, Peng Wang 님의 말: > Actually I don't really care about that, just don&#x

[go-nuts] Re: How many bytes binary.Write write before an error?

2016-12-15 Thread Peng Wang
OK, this point of view seems fair enough, I can take that. But won't a normal user would expect that // FooBuffer is some kind of buffer that fails randomly w := FooBuffer(conn) n ,err := m.WriteTo(w) // if binary.Write returns error, n will be 0, buf actual bytes may not be zero. // n == w.Buffe

[go-nuts] Re: How many bytes binary.Write write before an error?

2016-12-15 Thread Peng Wang
Then I should deal with the encoding of all the envelope fields. This envelope seems to be simple, but i got a more complicated one in the real dev works. 在 2016年12月16日星期五 UTC+8上午10:44:27,ma...@influxdb.com写道: > > > > On Thursday, December 15, 2016 at 6:05:53 PM UTC-8, Pen