gojuno / minimock

Powerful mock generation tool for Go programming language
MIT License
577 stars 38 forks source link

Enable generating mocks for interfaces in any stdlib package #29

Closed deadok22 closed 5 years ago

deadok22 commented 5 years ago

It appears there's a fixed set of standard library packages minimock can generate mocks for. For example, go run github.com/gojuno/minimock/cmd/minimock -g -i io.Reader succeeds while the following fails:

$ go run github.com/gojuno/minimock/cmd/minimock -g -i http.ResponseWriter
minimock: -: unknown import path "http": cannot find module providing package http
exit status 1
deadok22 commented 5 years ago

Oops, my bad:

$ go run github.com/gojuno/minimock/cmd/minimock -g -i net/http.ResponseWriter
minimock: ./response_writer_mock_test.go