[go-nuts] Japronto vs Go net/http

2017-03-07 Thread Gopher
Hi.Does anyone know why the Japronto is faster? Is it possible to do something about it? I noticed that the response header is larger than japronto header. Response header net/http additionally includes the current date. https://github.com/squeaky-pl/japronto -- You received this message bec

[go-nuts] escape analysis improvements?

2017-03-07 Thread apolcyn via golang-nuts
I'm guessing this is related to the same related questions about "bytes.Buffer" and escape analysis. The golang protobuf package (https://github.com/golang/protobuf) has a "proto.Buffer" type (https://github.com/golang/protobuf/blob/master/proto/lib.go#L309). The following program always heap

[go-nuts] expectations when pinning a go package

2017-03-07 Thread apolcyn via golang-nuts
This is a general question about package-user expectations, just wondering if I can confirm an idea. Suppose this scenario: 1. A user "foo-user" pins a go package "foo-package" to some old point "version-D" (maybe by checking out an old commit). 2. "foo-user" also has a dependency on "bar-pack

[go-nuts] Re: After conn.Close, connections is still alive

2017-03-07 Thread Allan
Yes, you're right. Thannk you. 在 2017年3月8日星期三 UTC+8上午12:05:33,Howard C. Shaw III写道: > > io.Copy is going to read from one stream and write to the other, until the > read stream is closed. "Copy copies from src to dst until either EOF is > reached on src or an error occurs." So until you close

[go-nuts] How to cause a net.Temporary Error?

2017-03-07 Thread Zachary Gershman
Hey All, While using an httptest server I was wondering if there was any possible way to trigger a net.Temporary error from the server side (like an i/o timeout). I've tried Hijack() and Closing all of the server connections but this results in an EOF not a Temporary Error. -- You received th

Re: [go-nuts] Re: constant 256 overflows byte

2017-03-07 Thread Marvin Stenger
memoryBlock[2] += (256-187) Am Mittwoch, 8. März 2017 01:48:08 UTC+1 schrieb Eric Brown: > > Actually, I didn't catch the int() in your example. I tried it, and it > worked! Thank you... > > On Tuesday, March 7, 2017 at 6:47:11 PM UTC-6, Eric Brown wrote: >> >> Thanks for the reply, Ayan. I th

Re: [go-nuts] Re: constant 256 overflows byte

2017-03-07 Thread Eric Brown
Actually, I didn't catch the int() in your example. I tried it, and it worked! Thank you... On Tuesday, March 7, 2017 at 6:47:11 PM UTC-6, Eric Brown wrote: > > Thanks for the reply, Ayan. I thought so too; however, I previously tried > this... and it resulted in the same error. > > On Tuesda

Re: [go-nuts] Re: constant 256 overflows byte

2017-03-07 Thread Eric Brown
Thanks for the reply, Ayan. I thought so too; however, I previously tried this... and it resulted in the same error. On Tuesday, March 7, 2017 at 6:34:27 PM UTC-6, Ayan George wrote: > > > > On 03/07/2017 07:06 PM, Eric Brown wrote: > > By the way, this is code snipped from within a conditional

Re: [go-nuts] Re: constant 256 overflows byte

2017-03-07 Thread Ayan George
On 03/07/2017 07:06 PM, Eric Brown wrote: > By the way, this is code snipped from within a conditional check, so > memoryBlock[2] will always be < 187 in this situation. > > On Tuesday, March 7, 2017 at 6:02:59 PM UTC-6, Eric Brown wrote: > > memoryBlock := make([]byte, 4) > binary.Litt

Re: [go-nuts] Re: constant 256 overflows byte

2017-03-07 Thread Ayan George
On 03/07/2017 07:06 PM, Eric Brown wrote: > memoryBlock[2] = 256 - (187 - memoryBlock[2]) ' results in error: > constant 256 overflows byte So since you're assigning to a byte I think Go is treating all of the constants as bytes. A byte can only encode between 0 and 255. You need an extra bit

[go-nuts] Re: constant 256 overflows byte

2017-03-07 Thread Eric Brown
By the way, this is code snipped from within a conditional check, so memoryBlock[2] will always be < 187 in this situation. On Tuesday, March 7, 2017 at 6:02:59 PM UTC-6, Eric Brown wrote: > > memoryBlock := make([]byte, 4) > > b

[go-nuts] constant 256 overflows byte

2017-03-07 Thread Eric Brown
memoryBlock := make([]byte, 4) binary.LittleEndian.PutUint32(memoryBlock, 12345678)

[go-nuts] 1.8.1 release time frame

2017-03-07 Thread Dave Cheney
Anocdotally the point one release tends to appear roughly a month after the dot zero release. This is not a commitment, just an observation. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving email

Re: [go-nuts] 1.8.1 release time frame

2017-03-07 Thread Ian Lance Taylor
On Tue, Mar 7, 2017 at 2:46 PM, wrote: > Anyone know if there is a plan for the 1.8.1 in terms of time? It seems to > have issues building up on it. There is no specific plan yet. As you say there are a number of issues, but none of them seem to be critical in the sense of requiring an immediat

[go-nuts] 1.8.1 release time frame

2017-03-07 Thread jonathan . gaillard
Anyone know if there is a plan for the 1.8.1 in terms of time? It seems to have issues building up on it. -- 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-

Re: [go-nuts] Re: [ANN] chasquid: An SMTP (email) server written in Go

2017-03-07 Thread Alberto Bertogli
On Fri, Mar 03, 2017 at 04:04:43AM -0800, Christian Joergensen wrote: > Nice work! Thanks! > Have you considered "un-internalizing" some of your packages that could be > useful outside your project? > > The spf and systemd packages looks pretty useful. The reason I originally went with intern

[go-nuts] gRPC, OAUTH and TLS in Go part 1 - gRPC and TLS

2017-03-07 Thread Simon Ritchie
I'm working on a solution that involves a gRPC connection authenticated using OAUTH. I pretty quickly discovered several things: - gRPC will not allow you to use OAUTH over an http connection. You must use an https connection. - There is quite a lot of infrastructure involved - There are lot

[go-nuts] [ANN] go-msi 1.0.1

2017-03-07 Thread mhhcbon
hi, I m pleased to announce latest release of go-msi. For recall go-msi is a tool to produce msi packaged application for windows. Via a json file you can import files, run hooks, declare shortcuts and env variables on the target system. It handles simple cases application. With the help of @

[go-nuts] Re: After conn.Close, connections is still alive

2017-03-07 Thread howardcshaw
io.Copy is going to read from one stream and write to the other, until the read stream is closed. "Copy copies from src to dst until either EOF is reached on src or an error occurs." So until you close the stream on your side (i.e. end the telnet session), your Go code is still sitting at that

[go-nuts] Re: After conn.Close, connections is still alive

2017-03-07 Thread Christian Joergensen
On Tuesday, March 7, 2017 at 2:32:50 PM UTC+1, 倪彦春 wrote: > > I don't understand why the connection at clinet side is not closed after > `c.Close()` ? > When do you expect c.Close() to be called? Is it called then? Cheers, Christian -- You received this message because you are subscribed to

[go-nuts] After conn.Close, connections is still alive

2017-03-07 Thread 倪彦春
I write a echo server as below: package main import ( "io" "log" "net" ) func main() { l, err := net.Listen("tcp", ":2000") checkErr(err) defer l.Close() for { conn, err := l.Accept() if err != nil { log.Fatal(err) continue } go f

[go-nuts] dep: Roadmap for merging into the toolchain

2017-03-07 Thread Sam Boyer
Hi folks, Since we opened up the dep project in late January, there's been flurry of contributions, which has been great. However, the plans and end goal of dep haven't been entirely clear to everyone. To address that, and help guide contributors, we've put out

Re: [go-nuts] 2016 User Survey Results published

2017-03-07 Thread Pablo de la Concepción Sanz
OK, thanks again, if it's complex don't worry about it, as Russ said it's easy to mentally mix some of those terms. I really apreciate your work and I think this survey gives some interesting insights about the Go community. On Mon, Mar 6, 2017 at 9:25 PM, Russ Cox wrote: > On Mon, Mar 6, 2017 a

Re: [go-nuts] How to create unique IDs when ranging over data in Golang and use in Javascript

2017-03-07 Thread Konstantin Khomoutov
On Tue, 7 Mar 2017 15:42:11 +0530 Rejoy Nair wrote: > Thanks a lot!. Your answers have been helpful. I was also provided > with a very good solution from another forum that I 'll post that > here for the benefit for anybody who 'd come across this post. You mean

Re: [go-nuts] How to create unique IDs when ranging over data in Golang and use in Javascript

2017-03-07 Thread Rejoy Nair
Thanks a lot!. Your answers have been helpful. I was also provided with a very good solution from another forum that I 'll post that here for the benefit for anybody who 'd come across this post. Its on the lines of what you 'd suggested. Till then I was actually beginning to think that this wasn'

[go-nuts] Re: Load public key from DER encoded certificate

2017-03-07 Thread Simon Ritchie
I've just put onto github a working example of an application that loads and uses a digital certificate. It's not DER, but the code is probably a good guide as to what you need to do: https://github.com/goblimey/grpc I hope this helps. Simon -- You received this message because you are sub