This one is tricky. I need to hold mutex during changes and it is not possible if OnEndEdit is not called in case of some error. This PR ensures that OnEndEdit is being called each time OnBeginEdit is called and succeeds.
First, please do a detailed review of test, I'm not sure that this is the best way to test this functionality (test fails on unchanged edit.go but generously, it looks ugly).
Second, please advice if there's another way of propagating changes back and forth from yang expected to be used instead of passing pointer to state?
This one is tricky. I need to hold mutex during changes and it is not possible if
OnEndEdit
is not called in case of some error. This PR ensures thatOnEndEdit
is being called each timeOnBeginEdit
is called and succeeds.First, please do a detailed review of test, I'm not sure that this is the best way to test this functionality (test fails on unchanged
edit.go
but generously, it looks ugly). Second, please advice if there's another way of propagating changes back and forth from yang expected to be used instead of passing pointer to state?