1

How do I explicitly say with my go test command to run only tests for the main package and not others in my source directory.

At the moment it's working with $go test -v. But... I am using goconvey as well and it seems to be running recursively. According to this page https://github.com/smartystreets/goconvey/wiki/Profiles I have a file where I can pass arguments into the go test command. I know you can go test -v ./... for recursive or go test -c packagename/... but how do I just do it for the main?

Raceimaztion
  • 9,494
  • 4
  • 26
  • 41
mcbain83
  • 492
  • 6
  • 19

1 Answers1

1

Profiles is one to accomplish this, but you can also specify a 'depth' for the runner:

$ goconvey -depth=0

A value of 0 limits the runner to the working directory.

Run goconvey -help for details.

Michael Whatcott
  • 5,603
  • 6
  • 36
  • 50