golang / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
9.26k stars 608 forks source link

Toggle off all comments #612

Open SamuelCabralCruz opened 2 years ago

SamuelCabralCruz commented 2 years ago

Would be nice to have a flag to toggle off all generated comments not only the package one.

SamuelCabralCruz commented 2 years ago

For the time being, I made a simple make recipe with the following snippet after the execution of mockgen:

    @head -n 2 $(destination) > $(destination).tmp
    @grep -v '^//' $(destination) >> $(destination).tmp
    @mv $(destination).tmp $(destination)

where destination is the location of the auto-generated file