cweill / gotests

Automatically generate Go test boilerplate from your source code.
Apache License 2.0
4.92k stars 346 forks source link

How to generate named tests? #177

Closed jurisbu closed 1 year ago

jurisbu commented 1 year ago

Hi,

How to generate named tests using map instead of slice? Doing a bit of archeology there seems to be support for this as part of #148. But how one can enable it from commandline? I cannot find any examples, or help or reference information. Passing -named does not work.

Would be great to add some help with examples?

gotests v1.6.0

cc @butuzov

jurisbu commented 1 year ago

OK, seems that the code that implements -named functionality has not been released, meaning it is still in develop branch. @cweill Can we expect v1.7.0 release at some point? :pray: Otherwise go install ...gotests@latest pulls in v1.6.0.

butuzov commented 1 year ago

Well you can just pick dev branch, it’s actually stable. At least it was 9 month ago. @cweill is/was pretty busy at that moment to release changes from develop branch.

On Fri, 4 Nov 2022 at 16:20, Juris @.***> wrote:

OK, seems that the code that implements -named functionality has not been released, meaning it is still in develop branch. @cweill https://github.com/cweill Can we expect v1.7.0 release at some point? 🙏 Otherwise go install ...@.*** pulls in v1.6.0.

— Reply to this email directly, view it on GitHub https://github.com/cweill/gotests/issues/177#issuecomment-1303626707, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE7EMBUZNWF5QLYRIQBFFLWGULTFANCNFSM6AAAAAARXGKTIY . You are receiving this because you were mentioned.Message ID: @.***>

jurisbu commented 1 year ago

@butuzov Yes that is one way, just have to remember when updating all Go tools from VS Code Go extension that I need to manually update gotests, since VS Code Go extension will update tools to @latest. A little inconvenience. Oh, well.

butuzov commented 1 year ago

If you specify path to go tests located elsewhere, viscose updating to @latest wouldn't affect your setup. It's possible with vscode extension.

stevenh commented 10 months ago

This is still causing an issue, any info when a version with -named will be released?

butuzov commented 10 months ago

@cweill good question. Charles, can we have it?

ysomad commented 9 months ago

Would be great, any updates on this?