Skip to content

Commit

Permalink
use API client for cmd run
Browse files Browse the repository at this point in the history
  • Loading branch information
taigrr committed Oct 21, 2023
1 parent 7cfb95c commit f9b305f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/grlx/ingredients/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
func FRun(target string, command CmdRun) (TargetedResults, error) {
// util target split
// check targets valid
client := http.Client{}
client.Timeout = command.Timeout
ctx, cancel := context.WithTimeout(context.Background(), command.Timeout)
defer cancel()
var tr TargetedResults
Expand Down Expand Up @@ -45,7 +43,7 @@ func FRun(target string, command CmdRun) (TargetedResults, error) {
return tr, err
}
req.Header.Set("Authorization", newToken)
resp, err := client.Do(req)
resp, err := pki.APIClient.Do(req)
if err != nil {
return tr, err
}
Expand Down

0 comments on commit f9b305f

Please sign in to comment.