Re: [go-nuts] goimports performance degrades in go module

2018-11-10 Thread Todd Neal
I tracked this down (at least it was the source of a slow goimports for me) and put up a CL at https://go-review.googlesource.com/c/tools/+/132598/ .The issue was that it's eventually exec'ing the go command for every import in the presence of modules, which adds up quickly and also doesn't

[go-nuts] Possible issue in contracts proposal

2018-09-10 Thread Todd Neal
In the "Pointer vs. value methods in contracts" section, it says "that it will prevent writing a function body that requires a value method". But, the go spec states: That function may be called normally with an explicit receiver, so these five invocations are equivalent:

Re: [go-nuts] Gitlab CI loses its marbles attempting go get.

2018-09-10 Thread Todd Neal
> On Sep 10, 2018, at 8:17 PM, Eric S. Raymond wrote: > > Todd Neal : >> >>> On Sep 10, 2018, at 5:53 PM, 'Borman, Paul' via golang-nuts >>> wrote: >>> >>> Have you checked your Go version? >> >> This is likely the cause, I j

Re: [go-nuts] Gitlab CI loses its marbles attempting go get.

2018-09-10 Thread Todd Neal
> On Sep 10, 2018, at 5:53 PM, 'Borman, Paul' via golang-nuts > wrote: > > Have you checked your Go version? This is likely the cause, I just tested with go 1.4.3 and get a similar error. I tested and both the golang:1.10.4-alpine3.8 and golang:1.11-alpine3.8 base images work fine. -

Re: [go-nuts] A thought on contracts

2018-09-09 Thread Todd Neal
On Tuesday, September 4, 2018 at 11:49:23 AM UTC-5, rog wrote: > > selector goes away too. For example, the Stringer contract in the > design doc purports to check that there's a method named String, which > it does not - it could be a function-valued field instead. > > In your example, you

Re: [go-nuts] Reflecting on an outer struct from a method of an inner one.

2018-09-06 Thread Todd Neal
Eric Raymond writes: > Obviously we can't use inheritance in the normal sense here, but I was > hoping that if an embedded instance of Cmd could discover the struct > instance it's part of, a similar thing could be pulled off. Alas, your > answer that this can't be done is unsurprising and

Re: [go-nuts] astutil.AddImport -- loosing all but the first import

2018-08-28 Thread Todd Neal
n...@mit.edu writes: > Thanks Todd. That fixed my problem. > > Concerning the dummy nodes to want to add to an AST, you could try adding > dummy methods to make them to conform to ast.Stmt or whatever? > You can, and you can add them as Expr's or Decl's but then you lose the ability to use

Re: [go-nuts] astutil.AddImport -- loosing all but the first import

2018-08-28 Thread Todd Neal
n...@mit.edu writes: > As can be seen from my recent posts, I've been playing a lot with the > automatic generation if go programs using go/ast and related packages. > > My current problem is that when I use astutil.AddImport. > > When I rn the program below, which creates a new ast.File and

[go-nuts] Re: Ecdsa different behaviour on 32-bit and 64-bit system

2017-05-02 Thread Todd Neal
Ivan, I tracked down the problem to a difference between the generic and optimized versions of the P256 implementations. I'm not 100% sure of the correct fix, so I submitted it as golang.org/issues/20215 with a link to your example. - Todd On Tuesday, May 2, 2017 at 12:33:56 PM UTC-5, Ivan

Re: [go-nuts] Re: [ANN] UniDoc PDF Toolkit for golang

2016-07-21 Thread Todd Neal
On Wednesday, July 20, 2016 at 6:19:44 PM UTC-5, kristian wrote: > > I agree with this. Go needs a pdf library that is apache, mit or > bsd licensed. > Have you seen github.com/jung-kurt/gofpdf? I think the API is a bit wonky as it's derived from FPDF, but it works and uses the MIT