dst
dst copied to clipboard
Decorated Syntax Tree - manipulate Go source with perfect fidelity.
I have a source file that uses cgo a lot, and running it through `dst` causes (some) empty lines in structs/functions to be removed. I tried some testing, and I...
I'm trying to generate some code using dst package. Part of the code involves multi-line string literal. I'd like to keep the code prettier by propagating the indentation level into...
This is minor, but curious whether you'd take a patch to grant users of the library control over import grouping. Some organizations (including my own) tend to group imports beyond...
it is hard to move the existed code based on `go/ast` to `dst` .
Thanks for the very useful dst package, I have used it a few times for rewriting code with great success! :) Now that the Go language proposal https://github.com/golang/go/issues/43651 has been...
Hello, This might be a real edge case, but just wanting to share. When for example, missing a `package main` you will get a panic: `panic: runtime error: invalid memory...
When `dst` automatically manages the imports block, the imports are internally keyed by path. This incorrectly assumes that only one import for each package path is possible. Although very rare,...
Would be nice to have support for [go's line directives](https://golang.org/cmd/compile/#hdr-Compiler_Directives). The simplest way I believe would be to avoid indenting line comments Decorations starting with `//line ` Thank you!
When using a decorator with `ResolveLocalPath` set to true with generics, the path of the generic type is returned as the package where the type is located. I think it...