]> Cypherpunks repositories - gostls13.git/commit
1) Fix a problem with tabwriter.Flush: any pending text not yet
authorRobert Griesemer <gri@golang.org>
Fri, 19 Jun 2009 00:06:08 +0000 (17:06 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 19 Jun 2009 00:06:08 +0000 (17:06 -0700)
commit1b9734b995f3d79ec9a412d7e33d3d50ad1a32be
tree0dcc0a5317ff00455bc5b227a5608c1d572c5cef
parent5eb5d4d3c04345a30408bcf9f10f72c9fd7bcb15
1) Fix a problem with tabwriter.Flush: any pending text not yet
   in a cell makes a final cell in that line
   (this showed up as occasionally missing single spaces in
   godoc-formatted declarations that fit on a single line)

2) Cleaned up tabwriter implementation a bit:
   - replaced local unicodeLen() with utf8.RuneCount()
   - instead of having 2 parallel arrays for line widths and sizes,
     have a single array of cells containing a width and size
   - factored code a bit better
   - added more comments
   - added testnames to tabwriter tests
   - added more test cases and fixed a broken test case that
     now works correctly

R=r
DELTA=279  (133 added, 62 deleted, 84 changed)
OCL=30509
CL=30514
src/pkg/tabwriter/tabwriter.go
src/pkg/tabwriter/tabwriter_test.go