vektra / mockery

A mock code autogenerator for Go
https://vektra.github.io/mockery/
BSD 3-Clause "New" or "Revised" License
6.15k stars 412 forks source link

Ensure generated imports doesn't start with digit #806

Closed leitzler closed 3 months ago

leitzler commented 3 months ago

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

Version of Go used when building/testing:

How Has This Been Tested?

Updated unit tests.

Checklist

LandonTClipp commented 3 months ago

Thanks for the fix. I'm a bit confused as to why mockery is doing this in the first place but regardless it seems like this will work. Will merge once the checks pass.

LandonTClipp commented 3 months ago

Look like github.com/vektra/mockery/v2/pkg/fixtures/12345678/http was not actually included in this PR?

leitzler commented 3 months ago

Ops, apologies, just pushed it too.

I'm a bit confused as to why mockery is doing this in the first place [..]

Yeah, me too. Feels like just adding a digit at the end would be enough. But I thought this fix was least intrusive as it won't change the existing behaviour 😅