Results 106 comments of Dave Brophy

Hery @horenmar I'm unable to reproduce this bug... Here's the code I'm using... perhaps you can tweak it to show when this bug appears? ```go package main import ( "go/format"...

Aah unfortunately dst knows nothing of the indentation level. When we render the output we just convert the dst nodes to ast nodes and feed the output through the standard...

Hmm... the logic to determine the import block was perhaps the most tricky to get right. There's like a million edge cases, and the code that does it is by...

Is there no work-around? Seems like you could create something like FileRestorer.DisableImportAdd yourself and run it before rendering the file?

The position of the node is just the position in the input file. As soon as the dst is modified, this would be incorrect...

Hi, I'm not really sure how much work it'll be... It could be relatively easy if the ast package doesn't receive major changes... but it was a huge undertaking to...

It's been a while since I created the `dst` package so I'd have to familiarise myself with the internals before making a call on this one. But, a panic is...

This has come up again in the Go 1.15 standard library. I will exclude `src/crypto/x509/x509.go` from this test because it now has a duplicate import. This has come up twice...

Hi Alexey! I’m taking a break from open source and trekking across Nepal for five months... today is the first internet I’ve had in over a month. I won’t have...

I'll investigate further where the best place to put this sorting is... But perhaps if sorting the input files works, this might be the better option - e.g. sorting less...