mock icon indicating copy to clipboard operation
mock copied to clipboard

How to mock receiver in method

Open forjoin92 opened this issue 2 years ago • 0 comments

Here is my codes: type A interface { aaa() string cstring() string }

type B struct { c string }

func (b *B) aaa() string { ... s := b.cstring() ... }

func (b *B) cstring() string { return b.c }

How can I mock b.cstring() in B.aaa()?

forjoin92 avatar Jun 07 '23 02:06 forjoin92