File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ func searchCmd() *cobra.Command {
3333 query := args [0 ]
3434 name , version , isVersioned := searcher .ParseVersionedPackage (query )
3535 if ! isVersioned {
36- results , err := searcher .Client ().Search (query )
36+ results , err := searcher .Client ().Search (cmd . Context (), query )
3737 if err != nil {
3838 return err
3939 }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ func Client() *client {
3232 }
3333}
3434
35- func (c * client ) Search (query string ) (* SearchResults , error ) {
35+ func (c * client ) Search (ctx context. Context , query string ) (* SearchResults , error ) {
3636 if query == "" {
3737 return nil , fmt .Errorf ("query should not be empty" )
3838 }
@@ -43,7 +43,7 @@ func (c *client) Search(query string) (*SearchResults, error) {
4343 }
4444 searchURL := endpoint + "?q=" + url .QueryEscape (query )
4545
46- return execGet [SearchResults ](context . TODO () , searchURL )
46+ return execGet [SearchResults ](ctx , searchURL )
4747}
4848
4949// Resolve calls the /resolve endpoint of the search service. This returns
You can’t perform that action at this time.
0 commit comments