Update usage message in search command to provide options and usage instructions

This commit is contained in:
Regis David Souza Mesquita 2024-12-07 11:19:14 +00:00
parent dce138339d
commit cfa071f9a5
No known key found for this signature in database

View file

@ -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] <query>\n", os.Args[0])
fmt.Println("Options:")
flag.PrintDefaults()
os.Exit(0)
}
// Validate provider flags