matryer / moq

Interface mocking tool for go generate
http://bit.ly/meetmoq
MIT License
1.96k stars 126 forks source link

Not installing for go 1.15 #194

Closed obaid-eltropy closed 1 year ago

obaid-eltropy commented 1 year ago

As per the instructions given for installing moq for go < 1.16, I'm running the following command

go get github.com/matryer/moq

but I'm getting below errors

internal/registry/registry.go:55:68: undefined: types.TypeParamList internal/registry/registry.go:65:15: undefined: types.TypeParamList internal/registry/registry.go:68:18: named.TypeParams undefined (type *types.Named has no field or method TypeParams)

breml commented 1 year ago

🤔 The go.mod file lists Go 1.18 as requirement. Also the CI pipelines are only testing with Go >= 1.18. So I am not sure, if support for Go < 1.18 is still a goal. Maybe just the instructions in the README.md are outdated.

obaid-eltropy commented 1 year ago

Since the installation instruction said as follows

To start using latest released version of Moq, just run:

Go version < 1.16 $ go get github.com/matryer/moq

So just wanted to check if it is still supported

sudo-suhas commented 1 year ago

Support for building moq on older versions of Go was discontinued with https://github.com/matryer/moq/pull/175. I called this out in the v0.3.0 release but missed updating the docs. Will close this issue after updating docs.

Even on older versions of Go, you can grab and use the pre-build binaries from the releases section.