code: func CalculateDiff(options *Options) (*Result, error) {
  	baseVersionQuery := models.GetDashboardVersionQuery{
  		DashboardId: options.Base.DashboardId,
  		Version:     options.Base.Version,
  		OrgId:       options.OrgId,
  	}
  
  	if err := bus.Dispatch(&baseVersionQuery); err != nil {
  		return nil, err
  	}
  
  	newVersionQuery := models.GetDashboardVersionQuery{
  		DashboardId: options.New.DashboardId,
  		Version:     options.New.Version,
  		OrgId:       options.OrgId,
  	}
  
  	if err := bus.Dispatch(&newVersionQuery); err != nil {
  		return nil, err
  	}
  
  	baseData := baseVersionQuery.Result.Data
  	newData := newVersionQuery.Result.Data
  
  	left, jsonDiff, err := getDiff(baseData, newData)
  	if err != nil {
  		return nil, err
  	}
  
  	result := &Result{}
  
  	switch options.DiffType {
  	case DiffDelta:
  
  		deltaOutput, err := deltaFormatter.NewDeltaFormatter().Format(jsonDiff)
  		if err != nil {
  			return nil, err
  		}
  		result.Delta = []byte(deltaOutput)
  
  	case DiffJSON:
  		jsonOutput, err := NewJSONFormatter(left).Format(jsonDiff)
  		if err != nil {
  			return nil, err
  		}
  		result.Delta = []byte(jsonOutput)
  
  	case DiffBasic:
  		basicOutput, err := NewBasicFormatter(left).Format(jsonDiff)
  		if err != nil {
  			return nil, err
  		}
  		result.Delta = basicOutput
  
  	default:
  		return nil, ErrUnsupportedDiffType
  	}
  
  	return result, nil
  }
docs: // CompareDashboardVersionsCommand computes the JSON diff of two versions,
  // assigning the delta of the diff to the `Delta` field.