Re: [go-nuts] Client library design for a WebSocket API and idiomatic Go

2017-10-24 Thread Ian Lance Taylor
On Tue, Oct 24, 2017 at 1:55 AM, 'Ray Scott' via golang-nuts wrote: > > I'm currently writing a client library for accessing a backend API, > everything is in > Go. From the Obj-C/Swift world that would look something like the first > example > below, where you'd pass a success and error closure

[go-nuts] Client library design for a WebSocket API and idiomatic Go

2017-10-24 Thread 'Ray Scott' via golang-nuts
I'm currently writing a client library for accessing a backend API, everything is in Go. From the Obj-C/Swift world that would look something like the first example below, where you'd pass a success and error closure to handle the 2 outcomes. The immediate error returned from the call would ind