package printer

Import Path
	go/printer (on golang.org and go.dev)

Dependency Relation
	imports 12 packages, and imported by one package

Involved Source Files
	    nodes.go
	d-> printer.go

Exported Type Names

type CommentedNode (struct) A CommentedNode bundles an AST node and corresponding comments. It may be provided as argument to any of the Fprint functions. Comments []*ast.CommentGroup Node interface{}
type Config (struct) A Config node controls the output of Fprint. Indent int Mode Mode Tabwidth int (*T) Fprint(output io.Writer, fset *token.FileSet, node interface{}) error
type Mode uint A Mode value is a set of flags (or 0). They control printing. const RawFormat const SourcePos const TabIndent const UseSpaces
Exported Values
func Fprint(output io.Writer, fset *token.FileSet, node interface{}) error Fprint "pretty-prints" an AST node to output. It calls Config.Fprint with default settings. Note that gofmt uses tabs for indentation but spaces for alignment; use format.Node (package go/format) for output that matches gofmt.
const RawFormat Mode = 1 // do not use a tabwriter; if set, UseSpaces is ignored
const SourcePos Mode = 8 // emit //line directives to preserve original source positions
const TabIndent Mode = 2 // use tabs for indentation independent of UseSpaces
const UseSpaces Mode = 4 // use spaces instead of tabs for alignment