• Russ Cox's avatar
    cmd/go: redefine -coverpkg to be a pattern list · e33794fb
    Russ Cox authored
    If you run
    
    	go test -coverpkg=all fmt
    
    one possible interpretation is that you want coverage for all the
    packages involved in the fmt test, not all the packages in the world.
    Because coverpkg was previously defined as a list of packages
    to be loaded, however, it meant all packages in the world.
    
    Now that the go command has a concept of package notation
    being used as a matching filter instead of a direct enumeration,
    apply that to -coverpkg, so that -coverpkg=all now has the
    more useful filter interpretation.
    
    Fixes #10271.
    Fixes #21283.
    
    Change-Id: Iddb77b21ba286d3dd65b62507af27e244865072d
    Reviewed-on: https://go-review.googlesource.com/76876
    Run-TryBot: Russ Cox <rsc@golang.org>
    Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
    e33794fb
search.go 11.9 KB