replace config exit code with failure exit code

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>
This commit is contained in:
jessicagreben 2021-12-30 05:37:57 -08:00
parent 59f7ef06d0
commit 4b03fa3100
2 changed files with 3 additions and 4 deletions

View file

@ -57,9 +57,8 @@ import (
)
const (
successExitCode = 0
failureExitCode = 1
configErrExitCode = 2
successExitCode = 0
failureExitCode = 1
// Exit code 3 is used for "one or more lint issues detected".
lintErrExitCode = 3
)

View file

@ -43,7 +43,7 @@ func CheckSD(sdConfigFiles, sdJobName string, sdTimeout time.Duration) int {
cfg, err := config.LoadFile(sdConfigFiles, false, false, logger)
if err != nil {
fmt.Fprintln(os.Stderr, "Cannot load config", err)
return configErrExitCode
return failureExitCode
}
var scrapeConfig *config.ScrapeConfig