Closed Sychorius closed 1 year ago
Change-Id: I2b1c58ccb694bb00d468caf16b839be558fa7276
fix: unPatch panic when MockValue on nil interface
en: fix bug unPatching panic when using MockValue to mock a interface variable zh: 修复MockVar对象是nil时,reflect.Value无法直接reset导致unPatch失败的问题
reflect: call of reflect.Value.Set on zero Value
Change-Id: I2b1c58ccb694bb00d468caf16b839be558fa7276
What type of PR is this?
fix: unPatch panic when MockValue on nil interface
What this PR does / why we need it (en: English/zh: Chinese):
en: fix bug unPatching panic when using MockValue to mock a interface variable zh: 修复MockVar对象是nil时,reflect.Value无法直接reset导致unPatch失败的问题
Which issue(s) this PR fixes:
reflect: call of reflect.Value.Set on zero Value