Update usage message in search command to provide options and usage instructions
This commit is contained in:
parent
dce138339d
commit
cfa071f9a5
1 changed files with 4 additions and 2 deletions
|
|
@ -20,8 +20,10 @@ func main() {
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if flag.NArg() < 1 {
|
if flag.NArg() < 1 {
|
||||||
fmt.Fprintln(os.Stderr, "Error: Query or URLs required")
|
fmt.Printf("Usage: %s [options] <query>\n", os.Args[0])
|
||||||
os.Exit(1)
|
fmt.Println("Options:")
|
||||||
|
flag.PrintDefaults()
|
||||||
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate provider flags
|
// Validate provider flags
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue