about summary refs log tree commit diff
path: root/tools/ipconverter
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/ipconverter/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/ipconverter/main.go b/tools/ipconverter/main.go
index 1211970..e0893a1 100644
--- a/tools/ipconverter/main.go
+++ b/tools/ipconverter/main.go
@@ -11,6 +11,11 @@ import (
 )
 
 func main() {
+	if len(os.Args) < 2 {
+		fmt.Fprintf(os.Stderr, "usage: %s <ip2int|int2ip> <values>\n", os.Args[0])
+		os.Exit(1)
+	}
+
 	cmd := path.Base(os.Args[1])
 
 	switch cmd {