#706·mock

How to mock receiver in method

Author: forjoin92Created Jun 7, 2023Updated Jun 7, 2023
Labelstype: feature request

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()?