Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion patch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"strconv"
"strings"

"github.com/bxcodec/faker/v3"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/bxcodec/faker/v3"
jsonpatch2 "github.com/evanphx/json-patch"

"github.com/snorwin/jsonpatch"
Expand All @@ -33,6 +33,7 @@ type B struct {
Uint32 uint32 `json:"uint32"`
Uint64 uint64 `json:"uint64"`
UintPtr uintptr `json:"ptr" faker:"-"`
Float64 float64 `json:"float64"`
}

type C struct {
Expand Down
4 changes: 4 additions & 0 deletions walker.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func (w *walker) walk(modified, current reflect.Value, pointer JSONPointer) erro
if modified.Bool() != current.Bool() {
w.replace(pointer, modified.Bool(), current.Bool())
}
case reflect.Float64:
if modified.Float() != current.Float() {
w.replace(pointer, modified.Float(), current.Float())
}
case reflect.Invalid:
// undefined interfaces are ignored for now
return nil
Expand Down