Skip to content

Commit

Permalink
fix: do not print timestamps in diff output
Browse files Browse the repository at this point in the history
Timestamps are now zeroed out before comparison.

Fix #142
  • Loading branch information
hbagdi committed Mar 16, 2021
1 parent a695777 commit 8bc5edb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions solver/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/kong/deck/crud"
"github.com/kong/deck/diff"
"github.com/kong/deck/utils"
"github.com/yudai/gojsondiff"
"github.com/yudai/gojsondiff/formatter"
)
Expand All @@ -14,6 +15,8 @@ var (
)

func getDiff(a, b interface{}) (string, error) {
utils.ZeroOutTimestamps(a)
utils.ZeroOutTimestamps(b)
aJSON, err := json.Marshal(a)
if err != nil {
return "", err
Expand Down

0 comments on commit 8bc5edb

Please sign in to comment.