mirror of
https://github.com/securego/gosec.git
synced 2024-12-24 11:35:52 +00:00
Tests broken if logger is not initialized
This commit is contained in:
parent
1ba8b93565
commit
94ac200d79
1 changed files with 3 additions and 1 deletions
|
@ -56,7 +56,9 @@ func (f *fileList) Set(path string) error {
|
||||||
func (f fileList) Contains(path string) bool {
|
func (f fileList) Contains(path string) bool {
|
||||||
for p := range f.patterns {
|
for p := range f.patterns {
|
||||||
if glob.Glob(p, path) {
|
if glob.Glob(p, path) {
|
||||||
logger.Printf("skipping: %s\n", path)
|
if logger != nil {
|
||||||
|
logger.Printf("skipping: %s\n", path)
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue