// Unpatch removes a monkeypatch from the specified function
// returns whether the function was patched in the first place
Unpatch removes a monkeypatch from the specified function
returns whether the function was patched in the first place
// Unpatch removes a monkeypatch from the specified function // returns whether the function was patched in the first place
func unpatchValue(target reflect.Value) bool {
	lock.Lock()
	defer lock.Unlock()
	patch, ok := patches[target.Pointer()]
	if !ok {
		return false
	}
	unpatch(target.Pointer(), patch)
	delete(patches, target.Pointer())
	return true
}
func unpatchValue ( target reflect . Value ) bool { lock . Lock ( ) defer lock . Unlock ( ) patch , ok := patches [ target . Pointer ( ) ] if ! ok { return false } unpatch ( target . Pointer ( ) , patch ) delete ( patches , target . Pointer ( ) ) return true }
Unpatch removes a monkeypatch from the specified function
returns whether the function was patched in the first place
Unpatch removes a monkeypatch from the specified function returns whether the function was patched in the first place