We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patchLog.Applied() is false when we run the following code snippet regardless the patch operation works as expected.
patchLog.Applied()
package main import ( "fmt" "github.com/r3labs/diff/v3" ) type Order struct { ID string `json:"id"` OrderItems OrderItems `json:"orderItems"` } type OrderItems struct { Items []string `json:"items"` } func main() { a := Order{ ID: "1234", } b := Order{ ID: "1234", OrderItems: OrderItems{[]string{"1", "2", "4"}}, } d, _ := diff.NewDiffer(diff.TagName("json")) changelog, _ := d.Diff(b, a) patchLog := d.Patch(changelog, &b) fmt.Printf("patchlog applied : %t \nhas errors %t \nerror count %d \n\n", patchLog.Applied(), patchLog.HasErrors(), patchLog.ErrorCount()) fmt.Printf("values \n a: %#v \n b: %#v", a, b) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
patchLog.Applied()
is false when we run the following code snippet regardless the patch operation works as expected.The text was updated successfully, but these errors were encountered: