Skip to content

Commit

Permalink
fix(lib/diff): adjust deepdiff.Diff params
Browse files Browse the repository at this point in the history
  • Loading branch information
ramfox committed Jun 10, 2019
1 parent 3aa475b commit 62a13eb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/diff.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package lib

import (
"context"
// "context"
"encoding/csv"
"encoding/json"
"fmt"
Expand Down Expand Up @@ -74,15 +74,13 @@ func (r *DatasetRequests) Diff(p *DiffParams, res *DiffResponse) (err error) {
return
}

ctx := context.Background()

_res := DiffResponse{
Stat: &deepdiff.Stats{},
A: leftData,
B: rightData,
}

if _res.Diff, err = deepdiff.Diff(ctx, leftData, rightData, deepdiff.OptionSetStats(_res.Stat)); err != nil {
if _res.Diff, err = deepdiff.Diff(leftData, rightData, deepdiff.OptionSetStats(_res.Stat)); err != nil {
return
}

Expand Down Expand Up @@ -157,7 +155,6 @@ func (r *DatasetRequests) loadDiffData(path, selector string, concise bool) (dat
err = json.Unmarshal(res.Bytes, &data)
return
}

file, err := r.node.Repo.Filesystem().Get(path)
if err != nil {
return nil, err
Expand Down

0 comments on commit 62a13eb

Please sign in to comment.