stretchr / testify

A toolkit with common assertions and mocks that plays nicely with the standard library
MIT License
22.5k stars 1.56k forks source link

mock: simplify implementation of FunctionalOptions #1571

Open dolmen opened 3 months ago

dolmen commented 3 months ago

Summary

Remove unnecessary use of reflect in the implementation of mock.FunctionalOptions().

Changes

Motivation

dolmen commented 3 months ago

@snirye Could you review this change as you are a mock.FunctionalOptions user?

dolmen commented 3 months ago

@nbaztec Could you review this change as you wrote the initial implementation?

dolmen commented 2 months ago

Rebased (with conflict resolution) after merge of f1b5324b903e87676e98b4fa3a5e2fbe2c7dddc5 (#1433).

andrewwillette commented 3 weeks ago

@dolmen can this be merged? I'm hoping to unblock 1578.