Re: [go-nuts] Unit testing AMQP/build flags for tests

2019-11-18 Thread burak serdar
On Mon, Nov 18, 2019 at 10:24 PM Shane H wrote: > > > > On Tuesday, November 19, 2019 at 4:11:52 PM UTC+11, burak serdar wrote: >> >> >> >> This is what I usually do in these situations: >> >> var amqpDial=amqp.Dial >> func (mq *MQ) Connect() (err error) { >> ... >>mq.conn, err = amqpDial(m

Re: [go-nuts] Unit testing AMQP/build flags for tests

2019-11-18 Thread Shane H
On Tuesday, November 19, 2019 at 4:11:52 PM UTC+11, burak serdar wrote: > > > > This is what I usually do in these situations: > > var amqpDial=amqp.Dial > func (mq *MQ) Connect() (err error) { > ... >mq.conn, err = amqpDial(mq.URI) > ... > } > > func TestConnect(t *testing.T) {

Re: [go-nuts] Unit testing AMQP/build flags for tests

2019-11-18 Thread burak serdar
On Mon, Nov 18, 2019 at 10:00 PM Shane H wrote: > > I'm trying to unit test some code (pasted below). I've struggled to find a > way to mock the amqp.Connection, so have decided to go the monkey patching > route. > > The test 'works' but only if I use the following incantation > go test -gcflags

[go-nuts] Unit testing AMQP/build flags for tests

2019-11-18 Thread Shane H
I'm trying to unit test some code (pasted below). I've struggled to find a way to mock the amqp.Connection, so have decided to go the monkey patching route. The test 'works' but only if I use the following incantation go test -gcflags=-l So, my next step is to ensure that -gcflags is set to pr

[go-nuts] Re: SSLKEYLOGFILE pre-master secret log for TLS?

2019-11-18 Thread psanford
You can set the tls.Config.KeyLogWritter to write out that information in the same format: https://golang.org/pkg/crypto/tls/#Config.KeyLogWriter On Saturday, November 16, 2019 at 9:36:33 AM UTC-8, Jason E. Aten wrote: > > I have wss websocket client that I need to decrypt the packets from in >

Re: [go-nuts] Golang and EOL of Windows 7 (Windows Server 2008)

2019-11-18 Thread Ian Lance Taylor
On Mon, Nov 18, 2019 at 10:13 AM 'Pier-Hugues Pellerin' via golang-nuts wrote: > > I've been trying to find information about how the Go team deals with EOL of > a specific platform. > I am working on products that currently support Windows 7 and were users will > not move quickly out of the > p

Re: [go-nuts] Golang and EOL of Windows 7 (Windows Server 2008)

2019-11-18 Thread Tyler Compton
As a data point, Go stopped supporting Windows XP in Go 1.10. That's 4 years after Microsoft officially ended support for the operating system. I don't think that's a hard rule, and it will probably depend on what version Go's main Windows contributors use. Relevant issue: https://golang.org/issue

[go-nuts] Golang and EOL of Windows 7 (Windows Server 2008)

2019-11-18 Thread 'Pier-Hugues Pellerin' via golang-nuts
Hello everyone, I've been trying to find information about how the Go team deals with EOL of a specific platform. I am working on products that currently support Windows 7 and were users will not move quickly out of the platform. Since the EOL of Windows 7 (and Windows Server 2008) is schedule

[go-nuts] Re: golang tool for splitting long lines

2019-11-18 Thread anderson . queiroz
Hi Sankar, Not really, a easy trick is to use json.MarshalIndent. It helped me a lot :) playgound: https://play.golang.org/p/nfr2ANR6pPH type A struct { A int B string C map[int]string } func main() { aa := A{ A: 1, B: "2", C: map[int]string{3: "3"},

[go-nuts] GopherCon Israel - Call for Papers & Free tickets

2019-11-18 Thread Miki Tebeka
Hello Gophers, We’re getting great submission to the GopherCon Israel CFP. However, we'd like to have more. We’ll raffle three FREE tickets to the conference among anyone who submitted a talk. Also, everyone who submitted will be invited to a talk on that will help them improve as speakers.