From d36f662c383492ac820a971f15fd8df286e6b82e Mon Sep 17 00:00:00 2001 From: chenfyun Date: Thu, 17 Jul 2025 15:46:37 +0800 Subject: [PATCH] Update main.go feat: display usage/help information when no command-line arguments are passed --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index aa67bc5..b459796 100644 --- a/main.go +++ b/main.go @@ -96,6 +96,11 @@ func loadAllowedSubnets() error { } func main() { + if len(os.Args) == 1 { + flag.Usage() + os.Exit(0) + } + flag.Parse() lvl := slog.LevelInfo if Opts.Verbose > 0 {