Results 122 comments of Dave Brophy

That's exactly what https://github.com/dave/dst will solve.

Sure go ahead. I'm interested to see what you come up with...

Thanks! I've got some big plans for this project... Imagine something like: ```go parser.Parse("foo.go").Search( nodes.OfType(nodes.CallExpr), nodes.HasParent().OfType(nodes.ExprStmt).HasId("foo"), ).ReplaceWith( jen.Qual("bar", "Foo").Call(), ) ``` ... basically a DSL to query and replace bits...

I'd love some feedback on how the `dst` package works in the real-world... I've been dog-fooding it myself in https://github.com/dave/forky... Forky uses `go/types` quite extensively which is quite closely bound...

Hi @llgoer, thanks for your feedback... however I’m having a little trouble understanding what you mean. Is this a bug? Or a feature request? Perhaps you can explain a little...

Sounds good! I’m going to be trekking across Nepal for five months this summer, so won’t have my laptop or much internet ... but it sounds like this could be...

Sounds like a good plan... I should be back in September. Thanks!

There's no specific function for inserting a raw string into the output, but `Op` will do exactly that. Be careful there's no qualified identifiers in the code you're adding because...

This isn't something I want to encourage this because if you slip a qualified identifier in by mistake it won't be added to the imports block.

To add a qualified identifier, you should be using `Qual` - see the [Identifiers](https://github.com/dave/jennifer#qual) section of the readme. > If I don't use the Op workaround I don't see any...