Closed evsamsonov closed 11 months ago
This likely isn't a mockery
issue. Please double check your go.mod
file features a valid go version.
@LandonTClipp It's issue mockery
in docker image. Did you try to reproduce it? go.mod have been generated by command go mod init
and it is correct:
module example.com
go 1.21.1
Apologies, you are right. It seems the Dockerfile is pulling in go 1.20 but your go.mod requires at least 1.21.1. Should be as simple as updating the Dockerfile if you want to send in a PR for that.
@evsamsonov did the new update fix your problem?
Yes, thanks
Description
Error
invalid go version '1.21.0': must match format 1.23
while mock generation in dockerMockery Version
v2.34.0
Golang Version
Go 1.21
Installation Method
Steps to Reproduce
go mod init test.com
test.go
with interfacetype Test interface { }
25 Sep 23 09:04 UTC INF couldn't read any config file version=v2.34.0 25 Sep 23 09:04 UTC INF Starting mockery dry-run=false version=v2.34.0 25 Sep 23 09:04 UTC INF Using config: dry-run=false version=v2.34.0 25 Sep 23 09:04 UTC WRN DEPRECATION: use of the packages config will be the only way to generate mocks in v3. Please migrate your config to use the packages feature. dry-run=false migration=https://vektra.github.io/mockery/v2.34/migrating_to_packages/ url=https://vektra.github.io/mockery/v2.34/features/#packages-configuration version=v2.34.0 25 Sep 23 09:04 UTC INF Walking dry-run=false version=v2.34.0 unable to find interface 25 Sep 23 09:04 UTC ERR Error parsing file error="err: exit status 1: stderr: go: errors parsing go.mod:\n/app/go.mod:3: invalid go version '1.21.1': must match format 1.23\n" dry-run=false version=v2.34.0 25 Sep 23 09:04 UTC ERR Unable to find 'Test' in any go files under this path dry-run=false version=v2.34.0