(Making it work correctly with -spaces is a bit of work and the output
won't make much sense as it is intended as input to tabwriter.)
Fixes #100.
R=rsc
https://golang.org/cl/154102
align with spaces instead of tabs.
-tabwidth=8
tab width in spaces.
- -align=true
- align columns.
Debugging flags:
trace = flag.Bool("trace", false, "print parse trace");
// layout control
- align = flag.Bool("align", true, "align columns");
tabwidth = flag.Int("tabwidth", 8, "tab width");
usespaces = flag.Bool("spaces", false, "align with spaces instead of tabs");
)
func printerMode() uint {
mode := uint(0);
- if !*align {
- mode |= printer.RawFormat
- }
if *usespaces {
mode |= printer.UseSpaces
}