Skip to content

Status should be initialized as UNKNOWN instead of OK #16

Description

@hrak

The initial state of check.String() (which uses check.status) is OK while the initial check result is UNKNOWN. These should match.

// Initialize the check - this will return an UNKNOWN result
// until more results are added.
check := nagiosplugin.NewCheck()

fmt.Printf("%s", check.String())   // returns: 'OK'

check.Finish()  // returns 'UNKNOWN: no check result specified'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions