code: func (p *PUBLISH) setVariableHeader() {
  	// Append the Topic Name to the variable header.
  	p.variableHeader = appendLenStr(p.variableHeader, p.TopicName)
  
  	if p.QoS != mqtt.QoS0 {
  		// Append the Packet Identifier to the variable header.
  		p.variableHeader = append(p.variableHeader, encodeUint16(p.PacketID)...)
  	}
  }
docs: // setVariableHeader sets the variable header to the Packet.