镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

allow mocked.On("X").Return(func(a Arguments) Arguments { return nil }) - #4

Merged
gburt merged 1 commit into
DevotedHealth:masterfrom
gburt:master
Feb 23, 2021
Merged

gburt merged 1 commit into
DevotedHealth:masterfrom
gburt:master

Conversation

@gburt

@gburt gburt commented Feb 23, 2021

Copy link
Copy Markdown

I've submitted this upstream at stretchr#742 but in 2 years they haven't even commented on it

@nik-andreev nik-andreev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this will make mocking functions that return functions harder, but I don't think we have this problem.

@gburt
gburt merged commit 20dee70 into DevotedHealth:master Feb 23, 2021
@gburt

gburt commented Feb 23, 2021

Copy link
Copy Markdown
Author

I guess this will make mocking functions that return functions harder, but I don't think we have this problem.

Not much harder - it pattern matches against the given func, and ignores things that don't have the right signature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants