matryer / moq

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

Update Golang and tools version for new language idioms #223

Closed arkadiuszos4chain closed 2 months ago

arkadiuszos4chain commented 2 months ago

This update addresses compatibility issues with newer Go language idioms. The current version of moq fails when encountering certain statements, such as:

for range 5 {
  // ...
}

which results in the following error:

couldn't load source package: sample.go:110:12: cannot range over 5 (untyped int constant)

Changes:

ns-skaranth commented 2 months ago

@arkadiuszos4chain could you add a test case that has some of the new constructs in the source somewhere?

arkadiuszos4chain commented 2 months ago

@arkadiuszos4chain could you add a test case that has some of the new constructs in the source somewhere?

@ns-skaranth I'm not sure if I choose best place, but you can check my test case.

sudo-suhas commented 2 months ago

@arkadiuszos4chain could you rebase the PR on the master branch? There were some changes made to run tests on the latest stable version

arkadiuszos4chain commented 2 months ago

@arkadiuszos4chain could you rebase the PR on the master branch? There were some changes made to run tests on the latest stable version

@sudo-suhas done.