mirror of
https://github.com/securego/gosec.git
synced 2025-03-01 12:43:28 +00:00
Discard the logs messages if the quite flag is set (#200)
This commit is contained in:
parent
830cb81b29
commit
7790709b81
1 changed files with 7 additions and 1 deletions
|
@ -17,6 +17,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
|
@ -275,7 +276,12 @@ func main() {
|
||||||
log.Fatal(e)
|
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
|
// Load config
|
||||||
config, err := loadConfig(*flagConfig)
|
config, err := loadConfig(*flagConfig)
|
||||||
|
|
Loading…
Reference in a new issue