code: func (s *Server) handleFindInformationRequest(r FindInformationRequest) []byte {
  	// Validate the request.
  	switch {
  	case len(r) != 5:
  		return newErrorResponse(r.AttributeOpcode(), 0x0000, ble.ErrInvalidPDU)
  	case r.StartingHandle() == 0 || r.StartingHandle() > r.EndingHandle():
  		return newErrorResponse(r.AttributeOpcode(), r.StartingHandle(), ble.ErrInvalidHandle)
  	}
  
  	rsp := FindInformationResponse(s.txBuf)
  	rsp.SetAttributeOpcode()
  	rsp.SetFormat(0x00)
  	buf := bytes.NewBuffer(rsp.InformationData())
  	buf.Reset()
  
  	// Each response shall contain Types of the same format.
  	for _, a := range s.db.subrange(r.StartingHandle(), r.EndingHandle()) {
  		if rsp.Format() == 0 {
  			rsp.SetFormat(0x01)
  			if a.typ.Len() == 16 {
  				rsp.SetFormat(0x02)
  			}
  		}
  		if rsp.Format() == 0x01 && a.typ.Len() != 2 {
  			break
  		}
  		if rsp.Format() == 0x02 && a.typ.Len() != 16 {
  			break
  		}
  
  		if buf.Len()+2+a.typ.Len() > buf.Cap() {
  			break
  		}
  		binary.Write(buf, binary.LittleEndian, a.h)
  		binary.Write(buf, binary.LittleEndian, a.typ)
  	}
  
  	// Nothing has been found.
  	if rsp.Format() == 0 {
  		return newErrorResponse(r.AttributeOpcode(), r.StartingHandle(), ble.ErrAttrNotFound)
  	}
  	return rsp[:2+buf.Len()]
  }
docs: // handle Find Information request. [Vol 3, Part F, 3.4.3.1 & 3.4.3.2]