79310633

Date: 2024-12-26 23:44:24
Score: 1
Natty:
Report link

None of the answers tell how to run test in specific file
Use regexp to find all the test functions(is there a better way?) in the given file, and run the with -run:

go test -v  --run "("$(grep '^func Test' your_filename_test.go | awk -F'[ (]' '{print $2}' | paste -s -d"|')")"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Alex Bozhenko