File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 11package sub
22
33import (
4+ "errors"
45 "fmt"
56 "sync"
67 "time"
@@ -45,6 +46,9 @@ func (p *portfolio) wait() {
4546
4647func SearchAction (c * cli.Context ) error {
4748 searchTerm := c .Args ().First ()
49+ if len (searchTerm ) == 0 {
50+ return errors .New ("Provide at least one search term" )
51+ }
4852
4953 maxResultsToPrint := c .Int ("max" )
5054
Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ module github.com/huangsam/namigo
22
33go 1.24
44
5- require github.com/PuerkitoBio/goquery v1.10.2
5+ require (
6+ github.com/PuerkitoBio/goquery v1.10.2
7+ github.com/urfave/cli/v2 v2.27.5
8+ )
69
710require (
811 github.com/andybalholm/cascadia v1.3.3 // indirect
912 github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
1013 github.com/russross/blackfriday/v2 v2.1.0 // indirect
11- github.com/urfave/cli/v2 v2.27.5 // indirect
1214 github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
1315 golang.org/x/net v0.35.0 // indirect
1416)
You can’t perform that action at this time.
0 commit comments