Skip to content

Commit

Permalink
detectors/gcp: fix incorrect variable name (#642)
Browse files Browse the repository at this point in the history
Signed-off-by: Koichi Shiraishi <[email protected]>
  • Loading branch information
zchee authored Jun 28, 2023
1 parent f778f24 commit efc15c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions detectors/gcp/faas.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ func (d *Detector) FaaSVersion() (string, error) {

// CloudRunJobExecution returns the execution id of the Cloud Run jobs.
func (d *Detector) CloudRunJobExecution() (string, error) {
if version, found := d.os.LookupEnv(cloudRunJobExecutionEnv); found {
return version, nil
if eid, found := d.os.LookupEnv(cloudRunJobExecutionEnv); found {
return eid, nil
}
return "", errEnvVarNotFound
}

// CloudRunJobTaskIndex returns the task index for the execution of the Cloud Run jobs.
func (d *Detector) CloudRunJobTaskIndex() (string, error) {
if version, found := d.os.LookupEnv(cloudRunJobTaskIndexEnv); found {
return version, nil
if tidx, found := d.os.LookupEnv(cloudRunJobTaskIndexEnv); found {
return tidx, nil
}
return "", errEnvVarNotFound
}
Expand Down

0 comments on commit efc15c2

Please sign in to comment.