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

docs: mention the tools.go approach to pin tool version #92

Closed marco-m closed 4 years ago

marco-m commented 4 years ago

Hello, thanks for pegomock! :-)

would it make sense to mention the tools.go approach to ensure that the pegomock executable is the same version for everybody using it an given project? I learned this from counterfeiter documentation and is explained in the Go module docs.

If you agree, I would be happy to provide a PR. Where in the README would you like it? I was thinking just after section "Generating Your First Mock and Using It".

petergtz commented 4 years ago

Hey @marco-m,

would it make sense to mention the tools.go approach to ensure that the pegomock executable is the same version for everybody using it an given project?

Absolutely.

If you agree, I would be happy to provide a PR.

That would be awesome. I'd be happy to merge it, thank you!

I was thinking just after section "Generating Your First Mock and Using It".

Sounds good to me.

Appreciate your help! Peter

jpopadak commented 4 years ago

FYI, there is a (somewhat) associated bug to doing the tools package in go mod tidy for Go 1.13. https://github.com/golang/go/issues/34514

petergtz commented 4 years ago

@jpopadak Apparently it's by design, not a bug. See https://github.com/petergtz/pegomock/issues/91#issuecomment-533463785 where I list a couple of related issues, in which some people argue that it works as designed.

I think I disagree. Anyway, for pegomock the problem is now solved in develop and I will merge it to master this week.

marco-m commented 4 years ago

@jpopadak thanks for the heads up. I will validate the instructions in the PR after the merge of develop.

petergtz commented 4 years ago

@marco-m Thank you very much for your contribution! Just merged it.

marco-m commented 4 years ago

Thank you for pegomock and your kind professionalism in handling contributions!