code: func (u *UITable) Print() error {
  	result := &bytes.Buffer{}
  	t := u.Table
  
  	err := t.PrintTo(result)
  	if err != nil {
  		return err
  	}
  
  	// DevNote. With the change to printing into a buffer all
  	// lines now come with a terminating \n. The t.ui.Say() below
  	// will then add another \n to that. To avoid this additional
  	// line we chop off the last \n from the output (if there is
  	// any). Operating on the slice avoids string copying.
  	//
  	// WIBNI if the terminal API had a variant of Say not assuming
  	// that each output is a single line.
  
  	r := result.Bytes()
  	if len(r) > 0 {
  		r = r[0 : len(r)-1]
  	}
  
  	// Only generate output for a non-empty table.
  	if len(r) > 0 {
  		u.UI.Say("%s", string(r))
  	}
  	return nil
  }
docs: // Print formats the table and then prints it to the UI specified at
  // the time of the construction. Afterwards the table is cleared,
  // becoming ready for another round of rows and printing.