I have a simple boolean flag I wish to pass args to:
import (
"flag"
...
)
var debugMode = flag.Bool("debug", false, "run in debug mode")
flag.Parse()
if *debugMode == true {
//print something
}
This code compiles and runs - but the variable is always true. I use the following call:
my_application -debug false
and it's never false. What am I doing wrong?