mirror of
https://github.com/golang/go
synced 2024-10-14 03:43:28 +00:00
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:
parent
e2e11f02a4
commit
0a18561032
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue