Gopls offers the source.test code action for a selection in a Test or Benchmark function; the action executes the test or benchmark. It would be useful and convenient if it offered a variant that executed the test with the -coverreport=cov.out flag and then ran go tool cover -html=cov.out to generate and open the coverage report in a browser.
Gopls offers the
source.testcode action for a selection in a Test or Benchmark function; the action executes the test or benchmark. It would be useful and convenient if it offered a variant that executed the test with the-coverreport=cov.outflag and then rango tool cover -html=cov.outto generate and open the coverage report in a browser.