Registry / utility / dave-dst

dave-dst

JSON →
library0.27.4gogounverified

Package dst declares the types used to represent decorated syntax trees for Go packages.

go get github.com/dave/dst
INSTALL
IMPORT
SIG · DAVE-DST
D
dave-dst
utilitygov0.27.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dst
github.com/dave/dst

Parse a Go source file into a decorated syntax tree.

package main import ( "fmt" "github.com/dave/dst" "github.com/dave/dst/decorator" ) func main() { f, _ := decorator.Parse("package main\n\nfunc main() {}\n") fmt.Printf("%T\n", f) }
Debug
Known issues
gotchadst is a fork of go/ast with decorations; it is not compatible with the standard ast package.
fix
Use dst and decorator instead of go/ast and parser when you need to preserve comments and formatting.
affects: all
Upgrade
Version history
0.27.4latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
dave-dst — go get dave-dst · libregistry