stretchr / testify

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

mock: simplify implementation of FunctionalOptions #1571

Closed dolmen closed 1 month ago

dolmen commented 8 months ago

Summary

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

Changes

Motivation

dolmen commented 8 months ago

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

dolmen commented 8 months ago

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

dolmen commented 7 months ago

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

andrewwillette commented 5 months ago

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