使用 mockgen 生成mock代码; 在测试函数中调用 gomock. ... Doer; }; func (m *Struct) Do(a, b int) error {; return m.Doer.DoSomething(a, b); }.
確定! 回上一頁