- make printer interface easily extensible w/o breaking clients (in the future)

- replacement for p4 CL 35999 (abandoned)

R=rsc
http://go/go-review/1012010
This commit is contained in:
Robert Griesemer 2009-10-22 18:19:49 -07:00
parent abc6ad427d
commit 8f52a82169
5 changed files with 79 additions and 70 deletions

View file

@ -271,7 +271,7 @@ func writeNode(w io.Writer, node interface{}, html bool, style printer.Styler) {
if html {
mode |= printer.GenHTML;
}
printer.Fprint(w, node, mode, *tabwidth, style);
(&printer.Config{mode, *tabwidth, style}).Fprint(w, node);
}