petergtz / pegomock

Pegomock is a powerful, yet simple mocking framework for the Go programming language
Apache License 2.0
252 stars 28 forks source link

Make sure import paths are sorted before iteration #83

Closed hferentschik closed 5 years ago

hferentschik commented 5 years ago

fixes issue #82

hferentschik commented 5 years ago

Thank you very much for your PR.

No problem.

Your changes make a lot of sense and I would like to merge them.

Awesome.

Just one minor thing: would you mind moving the sortedKeys function into a separate util package and make it public there? I know util packages are somewhat controversial, but this function is very generic and is not specific to mockgen, so ideally it's in its own package.

Sure. In fact, I was initially looking at the existing util package under pegomock, but then I was thinking that this util package is probably the one which is used as a utility package for the usage of pekomock. So when you say move sortedKey into a util package, do you mean a util package under mockgen?

Also, that would avoid the need to move mockgen_test into mockgen.

Sure.

I think the util package could either live directly in the pegomock directory, or here in the mockgen directory. Choose whatever you think makes more sense. Thank you.

:-) comes the answer. I think I prefer the latter. I will update the PR.

hferentschik commented 5 years ago

I pushed an update.

petergtz commented 5 years ago

Thank you! Merged.