code: func transmit(card *pcsc.Card, command *commandAPDU) (*responseAPDU, error) {
  	data, err := command.serialize()
  	if err != nil {
  		return nil, err
  	}
  
  	responseData, _, err := card.Transmit(data)
  	if err != nil {
  		return nil, err
  	}
  
  	response := new(responseAPDU)
  	if err = response.deserialize(responseData); err != nil {
  		return nil, err
  	}
  
  	// Are we being asked to fetch the response separately?
  	if response.Sw1 == sw1GetResponse && (command.Cla != claISO7816 || command.Ins != insGetResponse) {
  		return transmit(card, &commandAPDU{
  			Cla:  claISO7816,
  			Ins:  insGetResponse,
  			P1:   0,
  			P2:   0,
  			Data: nil,
  			Le:   response.Sw2,
  		})
  	}
  
  	if response.Sw1 != sw1Ok {
  		return nil, fmt.Errorf("Unexpected insecure response status Cla=0x%x, Ins=0x%x, Sw=0x%x%x", command.Cla, command.Ins, response.Sw1, response.Sw2)
  	}
  
  	return response, nil
  }
docs: // transmit sends an APDU to the smartcard and receives and decodes the response.
  // It automatically handles requests by the card to fetch the return data separately,
  // and returns an error if the response status code is not success.