Only print help when called without arguments

Fixes #401
This commit is contained in:
Filippo Valsorda 2022-04-26 18:11:49 +02:00
parent abde85bb26
commit d7ab78de71

View File

@ -85,6 +85,10 @@ const advancedUsage = `Advanced options:
var Version string
func main() {
if len(os.Args) == 1 {
fmt.Print(shortUsage)
return
}
log.SetFlags(0)
var (
installFlag = flag.Bool("install", false, "")