Is there a way how to set that certain flags are mandatory, or do I have to check for their presence on my own?
If you have flag path, simply check if *path contains some value
var path = flag.String("f", "", "/path/to/access.log") flag.Parse() if *path == "" { usage() os.Exit(1) }