code: func GetPendingMACCommand(p *redis.Pool, devEUI lorawan.EUI64, cid lorawan.CID) (*MACCommandBlock, error) {
  	var block MACCommandBlock
  
  	c := p.Get()
  	defer c.Close()
  
  	key := fmt.Sprintf(macCommandPendingTempl, devEUI, cid)
  	val, err := redis.Bytes(c.Do("GET", key))
  	if err != nil {
  		if err == redis.ErrNil {
  			return nil, nil
  		}
  		return nil, errors.Wrap(err, "get pending mac-command error")
  	}
  
  	err = gob.NewDecoder(bytes.NewReader(val)).Decode(&block)
  	if err != nil {
  		return nil, errors.Wrap(err, "gob decode error")
  	}
  
  	return &block, nil
  }
docs: // GetPendingMACCommand returns the pending mac-command for the given CID.
  // In case no items are pending, nil is returned.