You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if we run gotests -only PrintName it will generate the unit-tests for both functions
it could be interesting to support also the struct type in the regular expression like this: gotests -only structA.PrintName or gotests -only (structA).SetName
or create a new option: “-exact”: gotests -exact (structA).PrintName or gotests -exact structA.PrintName
The text was updated successfully, but these errors were encountered:
This is actually already supported for both "-only" and "-excl", but it is a bit awkward to use. The command for your example would be gotests -only StructAPrintName.
The regexes are matched against a functions "FullName" which includes the receiver type.
However the "FullName" uses title case for both receiver type and function name, and has no separator. Maybe it should be changed to match your example of structA.PrintName?
Currently with the option “-only” it is not possible to provide the “struct type” in the regular expression.
example:
if we run
gotests -only PrintName
it will generate the unit-tests for both functionsit could be interesting to support also the struct type in the regular expression like this:
gotests -only structA.PrintName
orgotests -only (structA).SetName
or create a new option: “-exact”:
gotests -exact (structA).PrintName
orgotests -exact structA.PrintName
The text was updated successfully, but these errors were encountered: