goToSlide(slideI, forward = null) {
    if (this.isValidIndexSlide_(slideI) &&
        !this.isMoving &&
        this.currentSlideI_ !== slideI) {
      this.isMoving = true;
      let isMovingForward = false;

      if (forward !== null) {
        isMovingForward = forward;
      } else {
        if (this.currentSlideI_ >= 0) {
          isMovingForward = slideI > this.currentSlideI_;
        }
      }
      const nextSlide = this.slides[slideI];

      if (this.currentSlide_ !== null && this.isVertical &&
        (!this.plugins.touch || !this.plugins.touch.isEnabled)) {
        this.scrollTransitionToSlide_(
            isMovingForward, nextSlide, this.onSlideChange_);
      } else {
        this.transitionToSlide_(
            isMovingForward, nextSlide, this.onSlideChange_);
      }
    }
  }
Goes to a given slide.
@param {!number} slideI The slide index.
@param {?boolean=} forward Whether we're forcing moving forward/backwards.
This parameter is used only from the goNext, goPrev functions to adjust the
scroll animations.