From c1c136d0c4c2057f33f2ce66c7f9ed60e3c2548d Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 5 Nov 2012 22:46:28 +0100 Subject: [PATCH] cmd/godoc: use normal gofmt printer settings for playground fmt R=gri CC=golang-dev https://golang.org/cl/6815081 --- src/cmd/godoc/play.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cmd/godoc/play.go b/src/cmd/godoc/play.go index dc549c0ee55..7033169c83f 100644 --- a/src/cmd/godoc/play.go +++ b/src/cmd/godoc/play.go @@ -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 }