Commit c1c136d0 authored by Andrew Gerrand's avatar Andrew Gerrand

cmd/godoc: use normal gofmt printer settings for playground fmt

R=gri
CC=golang-dev
https://golang.org/cl/6815081
parent 834028d5
...@@ -59,7 +59,11 @@ func gofmt(body string) (string, error) { ...@@ -59,7 +59,11 @@ func gofmt(body string) (string, error) {
} }
ast.SortImports(fset, f) ast.SortImports(fset, f)
var buf bytes.Buffer 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 { if err != nil {
return "", err return "", err
} }
......
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