Skip to content

Commit

Permalink
Remove deprecated function calls from go-check < 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RincewindsHat committed Jul 19, 2023
1 parent 148b018 commit 5a84f50
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5a84f50

Please sign in to comment.