code: func (q *QRCode) addPadding() {
  	numDataBits := q.version.numDataBits()
  
  	if q.data.Len() == numDataBits {
  		return
  	}
  
  	// Pad to the nearest codeword boundary.
  	q.data.AppendNumBools(q.version.numBitsToPadToCodeword(q.data.Len()), false)
  
  	// Pad codewords 0b11101100 and 0b00010001.
  	padding := [2]*bitset.Bitset{
  		bitset.New(true, true, true, false, true, true, false, false),
  		bitset.New(false, false, false, true, false, false, false, true),
  	}
  
  	// Insert pad codewords alternately.
  	i := 0
  	for numDataBits-q.data.Len() >= 8 {
  		q.data.Append(padding[i])
  
  		i = 1 - i // Alternate between 0 and 1.
  	}
  
  	if q.data.Len() != numDataBits {
  		log.Panicf("BUG: got len %d, expected %d", q.data.Len(), numDataBits)
  	}
  }
docs: // addPadding pads the encoded data upto the full length required.