code: func (s *Storage) Put(c context.Context, r storage.PutRequest) error {
  	c = prepareContext(c)
  
  	iface := s.getIface()
  	rw := rowWriter{
  		threshold: iface.getMaxRowSize(),
  	}
  
  	for len(r.Values) > 0 {
  		// Add the next entry to the writer.
  		if appended := rw.append(r.Values[0]); !appended {
  			// We have failed to append our maximum BigTable row size. Flush any
  			// currently-buffered row data and try again with an empty buffer.
  			count, err := rw.flush(c, iface, r.Index, r.Project, r.Path)
  			if err != nil {
  				return err
  			}
  
  			if count == 0 {
  				// Nothing was buffered, but we still couldn't append an entry. The
  				// current entry is too large by itself, so we must fail.
  				return fmt.Errorf("single row entry exceeds maximum size (%d > %d)", len(r.Values[0]), rw.threshold)
  			}
  
  			r.Index += types.MessageIndex(count)
  			continue
  		}
  
  		// We successfully appended this entry, so advance.
  		r.Values = r.Values[1:]
  	}
  
  	// Flush any buffered rows.
  	if _, err := rw.flush(c, iface, r.Index, r.Project, r.Path); err != nil {
  		return err
  	}
  	return nil
  }
docs: // Put implements storage.Storage.