From 5a84f50821d99ac508c07730558e97f0f145033a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= <12514511+RincewindsHat@users.noreply.github.com> Date: Wed, 19 Jul 2023 08:03:55 +0200 Subject: [PATCH] Remove deprecated function calls from go-check < 0.5.0 --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index a1e282b..3899e00 100644 --- a/main.go +++ b/main.go @@ -2,9 +2,10 @@ package main import ( "fmt" - "github.com/NETWAYS/go-check" "os" "time" + + "github.com/NETWAYS/go-check" ) const readme = `Icinga check plugin to run checks and other commands directly on @@ -56,12 +57,12 @@ func main() { err := config.Validate() if err != nil { - check.Exit(3, "could not validate parameters: %s", err) + check.ExitRaw(check.Unknown, "could not validate parameters: "+err.Error()) } err, rc, output := config.Run(time.Duration(plugin.Timeout) * time.Second) if err != nil { - check.Exit(3, "execution failed: %s", err) + check.ExitRaw(check.Unknown, "execution failed: "+err.Error()) } fmt.Print(output)