From 9d2d8b5725af93f1c1d19cffe77bd08641157550 Mon Sep 17 00:00:00 2001 From: "Artur M. Wolff" Date: Sun, 18 Oct 2020 23:02:35 +0200 Subject: [PATCH] Bump version to 1.0.0 --- .github/workflows/ci.yml | 2 +- README.md | 7 +++---- nagios/client.go | 2 +- nagios/status.go | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dd7350..43ce801 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,4 +50,4 @@ jobs: uses: golangci/golangci-lint-action@v2 with: version: v1.31 - args: -E goimports + args: -E goimports -E godot diff --git a/README.md b/README.md index 7ab15b4..89b54ab 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ -Nagios Core API client -====================== +# Nagios Core API client ![CI](https://github.com/ulumuri/go-nagios/workflows/CI/badge.svg) This is a Go client for the Nagios Core API that can communicate with the Nagios Core JSON CGIs. It's the programmatic equivalent of the `/nagios/jsonquery.html`. ## Installation -`go get -u github.com/ulumuri/go-nagios/nagios` +`go get -u github.com/ulumuri/go-nagios/nagios@v1.0.0` ## Support @@ -50,7 +49,7 @@ It's the programmatic equivalent of the `/nagios/jsonquery.html`. - [ ] hostdependencylist - [ ] hostescalationcount - [ ] hostescalationlist -- [ ] Status JSON CGI +- [x] Status JSON CGI - [x] hostcount - [x] hostlist - [x] host diff --git a/nagios/client.go b/nagios/client.go index 94abf43..5023864 100644 --- a/nagios/client.go +++ b/nagios/client.go @@ -49,7 +49,7 @@ func (c Client) Query(b QueryBuilder, v interface{}) error { if res.StatusCode != http.StatusOK { // io.Copy(ioutil.Discard, res.Body) - return fmt.Errorf("non-200 respone status code (%d)", res.StatusCode) + return fmt.Errorf("non-200 response status code (%d)", res.StatusCode) } d := json.NewDecoder(res.Body) diff --git a/nagios/status.go b/nagios/status.go index d6224f7..960e726 100644 --- a/nagios/status.go +++ b/nagios/status.go @@ -402,7 +402,7 @@ type ServiceDetails struct { ShouldBeScheduled bool `json:"should_be_scheduled"` LastCheck int64 `json:"last_check"` - // CheckOptions with bitmask turns to the array + // CheckOptions with bitmask turns into an array. CheckOptions json.RawMessage `json:"check_options"` CheckType string `json:"check_type"` ChecksEnabled bool `json:"checks_enabled"`