Remix.run Logo
suralind 2 days ago

Try https://github.com/maxbrunsfeld/counterfeiter

Groxx 2 days ago | parent [-]

AFAICT that uses go/types, loaded uniquely per execution via packages.Load¹, which is by far the primary reason why e.g. go.uber.org/mock (previously github.com/golang/mock) can become extremely slow.

mockery v3 does not do this. it type-checks just once for ALL mocks, regardless of the number, so it essentially does not grow slower as you create more mocks (since type checking is usually FAR slower than producing the mock).

1: https://github.com/maxbrunsfeld/counterfeiter/blob/000b82ca1...