1
0
mirror of https://github.com/securego/gosec.git synced 2025-03-19 21:08:30 +02:00

Tests broken if logger is not initialized

This commit is contained in:
Grant Murphy 2016-12-02 15:39:01 -08:00
parent 1ba8b93565
commit 94ac200d79

View File

@ -56,7 +56,9 @@ func (f *fileList) Set(path string) error {
func (f fileList) Contains(path string) bool {
for p := range f.patterns {
if glob.Glob(p, path) {
logger.Printf("skipping: %s\n", path)
if logger != nil {
logger.Printf("skipping: %s\n", path)
}
return true
}
}