Closed maranqz closed 3 years ago
I believe this is fixed on HEAD, just not released yet. Could you try installing head and see if it works, it did for me.
Also you can use reflect mode to generate just the interface you want, which would also solve this for you:
mockgen -destination=mock2/conn.go --package=mocknet net Conn
Let me know if this does not work and we can re-open.
@codyoss You are right. However, in generated file there is code (net "std/net"), which creates problem. "std/net: package std/net is not in GOROOT (/home/qz/go/go1.15.6/src/std/net)" The problem disappeared by replacing (net "std/net") with ("net").
command
mockgen -source=~/go/go1.15.6/src/net/net.go -destination=test/mock/net/Conn.go --package=mocknet
Actual behavior A clear and concise description of what the bug is.
2021/01/19 13:16:37 Loading input failed: ~/go/go1.15.6/src/net/net.go:397:2: unknown embedded interface error
Additional Information