gotests
gotests copied to clipboard
Error when current directory name ends with .go
If the name of the directory ends in .go, tests cannot be generated.
$ pwd
$GOPATH/src/github.com/scottjbarr/foo.go
$ gotests -all .
Parser.Parse source file: ioutil.ReadFile: read $GOPATH/src/github.com/scottjbarr/foo.go: is a directory
I've replaced the actual $GOPATH with $GOPATH
If the name of the directory is changed from "foo.go" to "foo", then test generation works as expected.
This seems like an unusual edge case, as I believe directories don't usually end in ".go". Feel free to make a pull request to address this issue.
Yes it is odd. Unfortunately I have seen it out in the world at two separate companies now.