From cfa071f9a561434d46060aee85ba46138e797845 Mon Sep 17 00:00:00 2001 From: Regis David Souza Mesquita Date: Sat, 7 Dec 2024 11:19:14 +0000 Subject: [PATCH] Update usage message in search command to provide options and usage instructions --- cmd/search/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/search/main.go b/cmd/search/main.go index a89f758..3b2e677 100644 --- a/cmd/search/main.go +++ b/cmd/search/main.go @@ -20,8 +20,10 @@ func main() { flag.Parse() if flag.NArg() < 1 { - fmt.Fprintln(os.Stderr, "Error: Query or URLs required") - os.Exit(1) + fmt.Printf("Usage: %s [options] \n", os.Args[0]) + fmt.Println("Options:") + flag.PrintDefaults() + os.Exit(0) } // Validate provider flags