agiledragon / agiledragon/gomonkey
ApplyMethod mock的目标是个interface,实际的函数调用是个struct,mock的时候报target type and double type are different
未关闭
- 主要语言
- Go
- 星标
- 2.3k
- 派生
- 192
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 1
描述
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
}
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。