[go-nuts] Re: Any golang support of Multicast from specific source in Windows?

2016-12-11 Thread mikioh . mikioh
looks like windows vista or above supports the required api. windows port stuff in net and x/net/{ipv4,ipv6} packages still lack tons of control knobs. feel free to send a patch for review if you'd like. thanks. cf: https://github.com/golang/go/wiki#contributing-to-the-go-project On Monday, Dece

Re: [go-nuts] http.Client interface

2016-12-11 Thread Kevin Conway
> How would I swap out a http.Client that is required by a third-party library with a another that supports, say retries with exponential back-off? I'd suggest looking at http.Transport and http.RoundTripper [ https://golang.org/pkg/net/http/#RoundTripper]. The docs explicitly forbid using RoundTr

[go-nuts] Any golang support of Multicast from specific source in Windows?

2016-12-11 Thread Javier Moran
Hi, I have been trying to build a golang program on Windows that joins to a Multicast group from a particular source address, so far unsucessfully. Looking at golang.org/x/ipv4/multicast_test.go, it looks like JoinSourceSpecificGroup is not supported in Windows. if err := p.Join

[go-nuts] Any solution for Multicast IGMPv3 support in windows for Golang?

2016-12-11 Thread jamoranca
Hello: It seems that IGMPv3 is only supported in linux in the golang.org/x/net/ipv4. Windows is not supported. See the following comment in golang.org/x/net/ipv4/multicast_test.go if err := p.JoinSourceSpecificGroup(ifi, &grp, tt.src); err != nil { switch runtime.G

Re: [go-nuts] Re: Isn't the use of Context in db/sql non-diomatic?

2016-12-11 Thread Tamás Gulácsi
2016. december 11., vasárnap 16:20:51 UTC+1 időpontban Daniel Theophanes a következőt írta: > > I don't think ops in context is how I would clean room design this, but it > is the better of many other options. > > The tx begin is easier, but still difficult when I need to ensure drivers > can se

Re: [go-nuts] CFG for a Go program

2016-12-11 Thread 'Alan Donovan' via golang-nuts
On 11 December 2016 at 12:21, wrote: > I am not sure how to get any starting node of type BasicBlock ( > ssa#BasicBlock ), so > that I can traverse the Graph using Preds/Succs relation. > An ssa.Program is a essentially collection of packag

Re: [go-nuts] CFG for a Go program

2016-12-11 Thread akshanshchahal
Hi If you can help with this problem, whenever you are free. I am not sure how to get any starting node of type BasicBlock (ssa#BasicBlock ), so that I can traverse the Graph using Preds/Succs relation. I am able to get ssa/program (ssa#Pr

Re: [go-nuts] Re: Isn't the use of Context in db/sql non-diomatic?

2016-12-11 Thread Daniel Theophanes
I don't think ops in context is how I would clean room design this, but it is the better of many other options. The tx begin is easier, but still difficult when I need to ensure drivers can set custom attributes. The problem with something like you suggested is it deviates too far from the origina

[go-nuts] Fun way to learn about Go (and others langages)

2016-12-11 Thread Jérôme LAFORGE
Hello all, My workmate pointed me a funny web site for working/learning about Go (and others language) with lot of fun. https://www.codingame.com By the way, you can find here the result of one of my first challenges: https://www.codingame.com/replay/solo/167065503 (you have to drive the man with

Re: [go-nuts] Re: Isn't the use of Context in db/sql non-diomatic?

2016-12-11 Thread Gulácsi Tamás
Good question. QueryContext(ctx context.Context, query QueryWithOpts, args ...interface{}) (sql.Rows, error) ? Where type QueryWithOpts struct { fmt.Stringer opts []qryOpt } and func Query(qry string, options ...qryOpt) QueryWithOpts á'lá sql.NamedArg. But this feels just as hacky, as

Re: [go-nuts] Re: Isn't the use of Context in db/sql non-diomatic?

2016-12-11 Thread Daniel Theophanes
How would you put them in query when args are the last ...warm? On Sat, Dec 10, 2016, 22:44 Tamás Gulácsi wrote: > I'd also like to change the API for passing options as Andrè suggested: by > optional funcs. But everywhere - they're not to be in a Context! > > To put them in Context feels a hack

[go-nuts] Re: Network error handle

2016-12-11 Thread Stannis Kozlov
Thanks, folks! It's clear now: func sock() { conn, err := net.Dial("tcp", "192.168.0.1:80") if err != nil { fmt.Printf("\nDial has an error for you: %v\n", err) return } fmt.Fprintf(conn, "GET / HTTP/1.0\r\n\r\n") status, err := bufio.NewReader(conn).ReadString('\n') fmt.Printf

[go-nuts] Re: Network error handle

2016-12-11 Thread Dave Cheney
Your printf does not include a newline character, so the panic message is from your usage of conn in the line fmt.Fprintf(conn, "GET / HTTP/1.0\r\n\r\n") Because an error occured during the dail, you cannot use or assume conn has any sensible value. On Sunday, 11 December 2016 21:43:02 UTC+11,

[go-nuts] Re: Network error handle

2016-12-11 Thread Stannis Kozlov
I've modified the function accordingly: func sock() { conn, err := net.Dial("tcp", "192.168.0.1:9991") if err != nil { fmt.Printf("\nDial has an error for you %v", err) } fmt.Fprintf(conn, "GET / HTTP/1.0\r\n\r\n") status, err := bufio.NewReader(conn).ReadString('\n') fmt.Printf("

[go-nuts] Re: thread.join equivalent in Go

2016-12-11 Thread Stannis Kozlov
I've been looking for a solution for .join like method in Go. Finally solution came with "sync": https://golang.org/pkg/sync/#WaitGroup -- 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

[go-nuts] http.Client interface

2016-12-11 Thread omarshariffdontlikeit
Just a quick question - I've noticed that the http package doesn't have an interface for Client. How would I swap out a http.Client that is required by a third-party library with a another that supports, say retries with exponential back-off? It appears that it is not possible? Would the http p