From 9ae78197dbf35e2ffc9bb4986b4c348f36d9e319 Mon Sep 17 00:00:00 2001 From: blinkthethings Date: Fri, 25 Dec 2020 11:32:51 -0500 Subject: [PATCH] Print usage if no arguments --- cmd/modhex.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/modhex.go b/cmd/modhex.go index 20ec8b8..b4c26bf 100644 --- a/cmd/modhex.go +++ b/cmd/modhex.go @@ -28,6 +28,11 @@ func main() { } flag.Parse() + if flag.NArg() < 1 { + flag.Usage() + os.Exit(0) + } + if decode { // decode was selected