• Rob Pike's avatar
    cmd/go: fix bad error message in coverage for package without non-test files · f7180362
    Rob Pike authored
    Was checking for nil map; must check for empty map instead.
    
    Fixes #6065
    
    Before:
    
    go test -cover
    # testmain
    /var/folders/00/013l0000h01000cxqpysvccm0004fc/T/go-build233480051/_/Users/r/issue/_test/_testmain.go:11: imported and not used: "_/Users/r/issue"
    FAIL	_/Users/r/issue [build failed]
    
    Now:
    
    go test -cover
    testing: warning: no tests to run
    PASS
    coverage: 0.0% of statements
    ok  	_/Users/r/issue	0.021s
    
    R=golang-dev, bradfitz
    CC=golang-dev
    https://golang.org/cl/12916043
    f7180362
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...