Closed Vilsol closed 3 years ago
Hey @Vilsol ,
Thanks for raising the issue. I will try work on a fix and get back to you.
Hey @Vilsol ,
This should now be fixed on v2.14.1
. Could you please test and see if it behaves as you expect?
You will need to change your implementation to:
package main
import (mapset "github.com/deckarep/golang-set"
"github.com/r3labs/diff/v2"
)
func main() {
a := mapset.NewSet("a", "b", "c")
b := mapset.NewSet("a", "c")
d, _ := diff.NewDiffer(diff.DisableStructValues())
cl, _ := d.Diff(b, a)
// produces: [{"type":"delete","path":["s","b"],"from":{},"to":null}]
}
Hi, thanks for the quick update!
Looks like everything is working as expected!
When trying to use the
github.com/deckarep/golang-set
library, running a diff on the sets causes a panic from the reflection package.Here is a minimum reproducible example:
And an example error:
I am using:
github.com/r3labs/diff/v2
->v2.14.0
github.com/deckarep/golang-set
->v1.7.1