ygot
ygot copied to clipboard
New DiffOpts
This PR adds new DiffOpt
types to change how diffs are generated.
-
PrependModuleNames
does the same asRFC7951JSONConfig.AppendModuleNames
but for the paths created in the diff notifications -
RFC7951Diff
encodes the value in thegnmipb.Update
as an IETF-JSON value instead of a proto value
First PR on this project so open to feedback. I looked at how the AppendModuleNames
works for EmitJSON()
to see if I could re-use any machinery but it didn't seem doable without a lot of work. If you have ideas on how to refactor that to share some infrastructure I'm open to doing it.
Also the test for the JSON encoding is failing but I can't figure out why. NotificationSetEqual()
thinks they're different but cmp.Diff()
disagrees so the output looks a little wonky.