I've been working on a lock-free mock library for Go called Moqueries (https://github.com/myshkin5/moqueries). Having a lock inside of your mock can cover up subtle bugs. The tool mocks interfaces which is fairly common but it also will mock a function type.