[go-nuts] Re: Raw http2 with TLS

2020-08-12 Thread Ian Gudger
I figured it out. ServeConn expects Handshake to have been called on the tls.Conn. It is unclear to me what an appropriate fix would be. Maybe just update the documentation for http2.(*Server).ServeConn? On Tue, Aug 11, 2020 at 11:06 AM Ian Gudger wrote: > I am trying to use the http2.Server di

[go-nuts] Pipe multiple commands in golang

2020-08-12 Thread thatipelli santhosh
Hi all, I have requirement to execute a command like cmd : *strings dynamic_file_path | grep regex* I don't know what is the best way to do this like any well known library or standard way. Can you please help here? -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-12 Thread 李晓辉
Maybe `type list` equals to `sum type` type SignedInteger interface { type int, int8, int16, int32, int64 } can replaced by type SignedInteger int|int8|int16|int32|int64 func max[type I SignedInteger](a I, b I) I { if a > b { return a } return b } 在2020年8月9日星期日 UTC+8 下午

[go-nuts] Seperate debuginfo?

2020-08-12 Thread ethan.pailes via golang-nuts
The C ecosystem allows one to generate a separate file containing debug info so that you can initially install a stripped library or binary and then only pull in the debug info as needed. I'm interested in doing the same for go, but I have not been able to find an equivalent to the -gsplit-dwar

Re: [go-nuts] Pipe multiple commands in golang

2020-08-12 Thread Marcin Romaszewicz
You have two options here. One, is you execute a shell, and just tell the shell to run your command, eg bash -c "strings dynamic_file_path | grep regex". The other option is that you exec strings and grep independently, and connect the two of them using an os.pipe, but it's a lot more work to do

Re: [go-nuts] Seperate debuginfo?

2020-08-12 Thread Ian Lance Taylor
On Wed, Aug 12, 2020 at 8:43 AM ethan.pailes via golang-nuts wrote: > > The C ecosystem allows one to generate a separate file containing debug info > so that you can initially install a stripped library or binary and then only > pull in the debug info as needed. I'm interested in doing the same

Re: [go-nuts] [generics] Was "no type contracts" considered?

2020-08-12 Thread Markus Heukelom
On Mon, Aug 10, 2020 at 8:30 PM Ian Lance Taylor wrote: > On Mon, Aug 10, 2020 at 6:07 AM Markus Heukelom > wrote: > > > > For what it is worth: for non-exported functions/types all operations > could be allowed, possibly leading to infamous C++-level error messages but > as you are the author o

[go-nuts] Re: Pipe multiple commands in golang

2020-08-12 Thread Tamás Gulácsi
cmdStrings := exec.Command("strings", dynamicFilePath) cmdRegex := exec.Command("grep", "regex") cmdRegex.Stdin = cmdStrings.Stdout if err := cmdRegex.Start(); ... if err := cmdStrings.Run(); ... if err := cmdRegex.Wait();... Or use http://labix.org/pipe santhoshth...@gmail.com a következőt írt

Re: [go-nuts] Seperate debuginfo?

2020-08-12 Thread 'Ethan Pailes' via golang-nuts
Wow, that works perfectly! Thank you so much! The --add-gnu-debuglink=x.debug bit was what I was missing. Unfortunately, it doesn't seem like delve supports separate debug info yet, so I'll have to stick with gdb in these situations. Also, it seems that upx[1] breaks the debuglink, which doesn'

[go-nuts] [ generics ] Added constraint type inference to the design draft

2020-08-12 Thread Ian Lance Taylor
I just added a new section to the generics design draft describing constraint type inference. This is a generalization and simplification of the earlier pointer method approach, which has now been removed. I would be happy to hear any comments. Thanks. https://go.googlesource.com/proposal/+/ref