ygot
ygot copied to clipboard
New DiffOpts
trafficstars
This PR adds new DiffOpt types to change how diffs are generated.
PrependModuleNamesdoes the same asRFC7951JSONConfig.AppendModuleNamesbut for the paths created in the diff notificationsRFC7951Diffencodes the value in thegnmipb.Updateas 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.