1216
1217
// Fprint "pretty-prints" an AST node to output for a given configuration cfg.
1217
1218
// Position information is interpreted relative to the file set fset.
1219
// to ast.Expr, ast.Decl, ast.Spec, or ast.Stmt.
1219
// The node type must be *ast.File, *CommentedNode, []ast.Decl, []ast.Stmt,
1220
// or assignment-compatible to ast.Expr, ast.Decl, ast.Spec, or ast.Stmt.
1221
1222
func (cfg *Config) Fprint(output io.Writer, fset *token.FileSet, node interface{}) error {
1222
1223
return cfg.fprint(output, fset, node, make(map[ast.Node]int))