restorer and patch adapted from https://gist.github.com/imosquera/6716490
thanks imosquera!
Restorer holds a function that can be used
to restore some previous state.
func Patch(destination, v interface{}) (Restorer, error)
Patch sets the value pointed to by the given destination to the given
value, and returns a function to restore it to its original value. The
value must be assignable to the element type of the destination.