[go-nuts] TCP Listen in windows to recieve data

2018-12-07 Thread golang user
I am bringing up TCP listener in windows OS, not sure how to recieve data from listener and send to command line IN UNIX WE DO AS FOLLOWS service := ":1200" tcpAddr, err := net.ResolveTCPAddr("tcp", service) listener, err := net.ListenTCP("tcp",tcpAddr) if err != nil { return "", err }

Re: [go-nuts] Re: Best way to handle database transactions? (commit, or rollback on error)

2018-12-07 Thread 'Eric Johnson' via golang-nuts
On Thu, Dec 6, 2018 at 4:37 PM roger peppe wrote: > How would generics help you here? The WithTxn function is already generic > (courtesy of closures) and there's no reason it couldn't be put in a > publicly importable package somewhere. > When I use the equivalent functionality, I tie it to an

[go-nuts] Starlight - run python inside Go to extend your applications - easily

2018-12-07 Thread Nate Finch
I’d like to announce starlight - https://github.com/starlight-go/starlight. Starlight wraps google’s Go implementation of the starlark python dialect (most notably found in the Bazel build tool). Starlight makes it super easy for users to extend your

[go-nuts] [security] Go 1.11.3 and Go 1.10.6 pre-announcement

2018-12-07 Thread Dmitri Shuralyov
Hello gophers, We plan to issue Go 1.11.3 and Go 1.10.6 on Wednesday, December 12 at approximately 8 pm UTC (12 pm PST, 3 pm EST). These are minor releases to fix a security issue. Following our policy at https://golang.org/security, this is the pre-announcement of those releases. Thanks,

Re: [go-nuts] navigating through interface calls

2018-12-07 Thread Robert Engels
IntelliJ has “show implementations” which will do what you want. > On Dec 7, 2018, at 11:13 AM, Burak Serdar wrote: > > On Fri, Dec 7, 2018 at 9:53 AM David Wahlstedt > wrote: >> >> Hi, >> I am still quite inexperienced in go programming, and I find it quite >> frustrating, sometimes, to

Re: [go-nuts] navigating through interface calls

2018-12-07 Thread Burak Serdar
On Fri, Dec 7, 2018 at 9:53 AM David Wahlstedt wrote: > > Hi, > I am still quite inexperienced in go programming, and I find it quite > frustrating, sometimes, to find what will actually be executed by a call to > an interface method found in some arbitrary code. > Here I have traced the

[go-nuts] Re: navigating through interface calls

2018-12-07 Thread howardcshaw
It is rather the point of interfaces that there IS no fixed definition of an instance of an Interface call. The definition could be that of ANY struct that matches that interface, depending on what is passed. So yes, you have to find AN instance of a call to the function that accepts an

[go-nuts] navigating through interface calls

2018-12-07 Thread David Wahlstedt
Hi, I am still quite inexperienced in go programming, and I find it quite frustrating, sometimes, to find what will actually be executed by a call to an interface method found in some arbitrary code. Here I have traced the process of finding the definition of "conn.Close()" an instance of an

Re: [go-nuts] convert *byte to []byte

2018-12-07 Thread 'Bryan C. Mills' via golang-nuts
On Fri, Dec 7, 2018 at 10:50 AM roger peppe wrote: > On Fri, 7 Dec 2018, 3:26 pm 'Bryan Mills' via golang-nuts < > golang-nuts@googlegroups.com wrote: > >> On Monday, December 3, 2018 at 12:02:07 AM UTC-5, Ian Lance Taylor wrote: >>> >>> On Sat, Dec 1, 2018 at 9:39 AM wrote: >>> > >>> > I am

Re: [go-nuts] convert *byte to []byte

2018-12-07 Thread roger peppe
On Fri, 7 Dec 2018, 3:26 pm 'Bryan Mills' via golang-nuts < golang-nuts@googlegroups.com wrote: > On Monday, December 3, 2018 at 12:02:07 AM UTC-5, Ian Lance Taylor wrote: >> >> On Sat, Dec 1, 2018 at 9:39 AM wrote: >> > >> > I am using swig wrap a c++ module , the generated go code is like

Re: [go-nuts] convert *byte to []byte

2018-12-07 Thread 'Bryan Mills' via golang-nuts
On Monday, December 3, 2018 at 12:02:07 AM UTC-5, Ian Lance Taylor wrote: > > On Sat, Dec 1, 2018 at 9:39 AM > wrote: > > > > I am using swig wrap a c++ module , the generated go code is like this: > > > > type MediaFrame interface { > > GetLength() uint > > GetData() (*byte) >

Re: [go-nuts] golang.org/x/oauth2 bug???

2018-12-07 Thread Burak Serdar
On Fri, Dec 7, 2018 at 6:46 AM Harald Fuchs wrote: > > I think there's something fishy about clientcredentials. Having > trouble with client_secrets containig special chars, first I modified > clientcredentials_test.go like this: > > > func TestTokenRequest(t *testing.T) { > > cfg := newConf("")

[go-nuts] golang.org/x/oauth2 bug???

2018-12-07 Thread Harald Fuchs
I think there's something fishy about clientcredentials. Having trouble with client_secrets containig special chars, first I modified clientcredentials_test.go like this: > func TestTokenRequest(t *testing.T) { > cfg := newConf("") > data := fmt.Sprintf("%s:%s", cfg.ClientID, cfg.ClientSecret) >

[go-nuts] windows TCP listen bind to loopback address and get data and spawn through application request

2018-12-07 Thread phanee1712
Looking for sample in windows a) TCP listener with loop back address on 127.0.0.2/8844 b) read data and spawn child process to execute listener data one more notice, in unix we read listener file descripter, how about in windows? ( i know windows does not support file descripters By the

Re: [go-nuts] Why is this code runs sequentially?

2018-12-07 Thread roger peppe
You want to run it concurrently, but you also need the results in order so that you can concatenate them together in the right order (I'm assuming). Something like this would do the trick: https://play.golang.org/p/lMI8rmEBJ-d On Thu, 6 Dec 2018 at 23:40, Alex Dvoretskiy wrote: > Hi Golangnuts,