Skip to content

Commit

Permalink
change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioLangaritaBenitez committed Feb 5, 2025
1 parent c605b88 commit 2a05ebf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,19 +287,19 @@ func RunService(c *cluster.Cluster, name string, token string, endpoint string,
// JobService invokes a service asynchronously
func JobService(c *cluster.Cluster, name string, token string, endpoint string, input io.Reader) (responseBody io.ReadCloser, err error) {

var runServiceURL *url.URL
var jobServiceURL *url.URL
if token != "" {
runServiceURL, err = url.Parse(endpoint)
jobServiceURL, err = url.Parse(endpoint)
} else {
runServiceURL, err = url.Parse(c.Endpoint)
jobServiceURL, err = url.Parse(c.Endpoint)
}

if err != nil {
return nil, cluster.ErrParsingEndpoint
}
runServiceURL.Path = path.Join(runServiceURL.Path, jobPath, name)
jobServiceURL.Path = path.Join(jobServiceURL.Path, jobPath, name)
// Make the request
req, err := http.NewRequest(http.MethodPost, runServiceURL.String(), input)
req, err := http.NewRequest(http.MethodPost, jobServiceURL.String(), input)
if err != nil {
return nil, cluster.ErrMakingRequest
}
Expand Down

0 comments on commit 2a05ebf

Please sign in to comment.