Commit 0a185610 authored by Robert Griesemer's avatar Robert Griesemer

cmd/printer: document that Fprint doesn't match gofmt output

Fixes #16963.

Change-Id: Iaadf0da4ee9cc97146c5e6ac2d93de9ae6893880
Reviewed-on: https://go-review.googlesource.com/29790Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
parent e2e11f02
......@@ -1292,6 +1292,8 @@ func (cfg *Config) Fprint(output io.Writer, fset *token.FileSet, node interface{
// 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 alignent;
// use format.Node (package go/format) for output that matches gofmt.
//
func Fprint(output io.Writer, fset *token.FileSet, node interface{}) error {
return (&Config{Tabwidth: 8}).Fprint(output, fset, node)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment