mirror of
https://github.com/golang/go
synced 2024-11-25 23:58:02 -07:00
cmd/godoc: use normal gofmt printer settings for playground fmt
R=gri CC=golang-dev https://golang.org/cl/6815081
This commit is contained in:
parent
834028d527
commit
c1c136d0c4
@ -59,7 +59,11 @@ func gofmt(body string) (string, error) {
|
||||
}
|
||||
ast.SortImports(fset, f)
|
||||
var buf bytes.Buffer
|
||||
err = printer.Fprint(&buf, fset, f)
|
||||
config := printer.Config{
|
||||
Mode: printer.UseSpaces | printer.TabIndent,
|
||||
Tabwidth: 8,
|
||||
}
|
||||
err = config.Fprint(&buf, fset, f)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user