[go-nuts] Re: New methods on imported structs: how do I do this with complex external structs

2020-10-13 Thread Volker Dobler
You cannot do this. 1. You cannot add methods to imported types. 2. Embedding is not inheritance. (While sometimes things which are often done via inheritance can be done with embedding too embedding simply is not inheritance and leads to a totally different type.) 3. Go's slices (and arrays) are

[go-nuts] New methods on imported structs: how do I do this with complex external structs

2020-10-13 Thread Glen Newton
Hello, Context: looked at: https://stackoverflow.com/questions/28800672/how-to-add-new-methods-to-an-existing-type-in-go as well as the discussion on this issue: ""cannot define new methods on non-local type ___" is not always an error #31631" https://github.com/golang/go/issues/31631 Ofte

[go-nuts] Re: Capture Outgoing Port for a HTTP Request

2020-10-13 Thread ryan...@gmail.com
One problem came up. Sorry for the false positive. How can I capture this information for a request which failed to connect? If a connection times out with, say "context deadline exceeded (Client.Timeout exceeded while awaiting headers)", the local outgoing port is not captured. I'm not seeing

Re: [go-nuts] Debug symbol when using gccgo

2020-10-13 Thread Ian Lance Taylor
On Tue, Oct 13, 2020 at 12:52 AM Yonatan Gizachew wrote: > > I am building a C-shared library from go code like below: > > go build -o awesome.so -buildmode=c-shared myprog.go > > How can I build the C_shared library in debug mode? It should work to use -gccgoflags=-g. Ian -- You received thi

[go-nuts] Re: CSS-like selectors for Go AST?

2020-10-13 Thread David Skinner
We have something like that on the drawing board, but right now it is very much vaporware. The basic concept that we are using, is that you create a new instance of a type of input and specify a CSS style of class. The actual implementation of the class may vary depending upon whether the DI sa

[go-nuts] Debug symbol when using gccgo

2020-10-13 Thread Yonatan Gizachew
I am building a C-shared library from go code like below: > go build -o awesome.so -buildmode=c-shared myprog.go How can I build the C_shared library in debug mode? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] CSS-like selectors for Go AST?

2020-10-13 Thread cpu...@gmail.com
Good morning. I've recently found myself writing a code generator for dynamic interface composition at runtime. It became ugly and I had to pass in quite a number of parameters that should have been available from reading the source code. In a second attempt I've reimplemented the generator usi

[go-nuts] gccgo compiler and gold linker

2020-10-13 Thread Yonatan Gizachew
Does installing gccgo as: > sudo apt-get install gccgo enable the gold linker by default? If not, how can I enable it? I am using Ubuntu 18.04 machine -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop rec