-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2020 New Relic Corporation. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// Golang code for Go versions greater or equal than 1.12. | ||
// | ||
// +build go1.12 | ||
|
||
package gobackfill | ||
|
||
import "os/exec" | ||
|
||
// ExitCode wrapping to backfill old Golang versions. | ||
// Negative values mean: | ||
// * -1: not exited | ||
// * -2: unknown | ||
func ExitCode(exitError *exec.ExitError) int { | ||
return exitError.ExitCode() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2020 New Relic Corporation. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// Golang code for Go versions lower than 1.12. | ||
// | ||
// +build !go1.12 | ||
|
||
package gobackfill | ||
|
||
import "os/exec" | ||
|
||
// ExitCode not supported, always value -2, as -1 belong to not finished. | ||
func ExitCode(exitError *exec.ExitError) int { | ||
return -2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters