package printer

Import Path
	go/printer (on and

Dependency Relation
	imports 12 packages, and imported by one package

Involved Source Files nodes.go Package printer implements printing of AST nodes.
Package-Level Type Names (total 3)
/* sort by: | */
A CommentedNode bundles an AST node and corresponding comments. It may be provided as argument to any of the Fprint functions. Comments []*ast.CommentGroup // *ast.File, or ast.Expr, ast.Decl, ast.Spec, or ast.Stmt
A Config node controls the output of Fprint. // default: 0 (all code is indented at least by this much) // default: 0 // default: 8 Fprint "pretty-prints" an AST node to output for a given configuration cfg. Position information is interpreted relative to the file set fset. The node type must be *ast.File, *CommentedNode, []ast.Decl, []ast.Stmt, or assignment-compatible to ast.Expr, ast.Decl, ast.Spec, or ast.Stmt.
A Mode value is a set of flags (or 0). They control printing. const RawFormat const SourcePos const TabIndent const UseSpaces
Package-Level Functions (only one)
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.
Package-Level Constants (total 4)
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