1
0
mirror of https://github.com/securego/gosec.git synced 2025-07-03 00:27:05 +02:00

Assert that sample code compiles

This commit is contained in:
Chris Bandy
2021-01-01 13:30:45 -06:00
committed by Cosmin Cojocar
parent bcfb27955e
commit e100f6b862
2 changed files with 6 additions and 0 deletions

View File

@ -142,3 +142,8 @@ func (p *TestPackage) Pkgs() []*packages.Package {
}
return []*packages.Package{}
}
// PrintErrors prints to os.Stderr the accumulated errors of built packages
func (p *TestPackage) PrintErrors() int {
return packages.PrintErrors(p.Pkgs())
}