mirror of
https://github.com/securego/gosec.git
synced 2025-01-16 02:33:33 +02:00
Discard the logs messages if the quite flag is set (#200)
This commit is contained in:
parent
830cb81b29
commit
7790709b81
@ -17,6 +17,7 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/user"
|
||||
@ -275,7 +276,12 @@ func main() {
|
||||
log.Fatal(e)
|
||||
}
|
||||
}
|
||||
logger = log.New(logWriter, "[gas] ", log.LstdFlags)
|
||||
|
||||
if *flagQuiet {
|
||||
logger = log.New(ioutil.Discard, "", 0)
|
||||
} else {
|
||||
logger = log.New(logWriter, "[gas] ", log.LstdFlags)
|
||||
}
|
||||
|
||||
// Load config
|
||||
config, err := loadConfig(*flagConfig)
|
||||
|
Loading…
Reference in New Issue
Block a user