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

Fixes #16963.

Change-Id: Iaadf0da4ee9cc97146c5e6ac2d93de9ae6893880
Reviewed-on: https://go-review.googlesource.com/29790
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Robert Griesemer 2016-09-26 12:43:21 -07:00
parent e2e11f02a4
commit 0a18561032

View file

@ -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)