fix: default value is -1 for critical and warning options
This commit is contained in:
parent
ab6f301467
commit
0cee7e7d37
1 changed files with 3 additions and 3 deletions
|
@ -18,8 +18,8 @@ var (
|
|||
PASSWORD = flag.String("password", "", "mysql password")
|
||||
DATABASE = flag.String("database", "", "mysql database")
|
||||
QUERY = flag.String("query", "", "mysql query")
|
||||
WARNING = flag.Int("warning", 0, "limit to return a warning alert")
|
||||
CRITICAL = flag.Int("critical", 0, "limit to return a critical alert")
|
||||
WARNING = flag.Int("warning", -1, "limit to return a warning alert")
|
||||
CRITICAL = flag.Int("critical", -1, "limit to return a critical alert")
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
@ -34,7 +34,7 @@ func init() {
|
|||
Critical("Please set query option")
|
||||
}
|
||||
|
||||
if *WARNING == 0 || *CRITICAL == 0 {
|
||||
if *WARNING == -1 || *CRITICAL == -1 {
|
||||
Critical("Please set warning and critical options")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue