agiledragon / agiledragon/gomonkey

ApplyMethod mock的目标是个interface,实际的函数调用是个struct,mock的时候报target type and double type are different

Open
#30 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.3k
Forks
192
Avg merge
1d 6h
Merged PRs (30d)
1

Description

target type(
func(*serverless.realServerlessControl, context.Context, string) error)
and double type(
func(*serverless.ServerlessControlInterface, context.Context, string) error) are different
其中 realServerlessControl实现了ServerlessControlInterface 这个interface,这种如何处理,望回复 感谢

type realServerlessControl struct {
}

type ServerlessControlInterface interface {
CreateFunction(ctx context.Context, functionId string) error
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.