Merge pull request #1 from unpoller/platinummonkey-patch-1

fix nil pointer bug
This commit is contained in:
Cody Lee 2022-10-27 16:27:55 -05:00 committed by GitHub
commit 8902b7ad9d
2 changed files with 2 additions and 4 deletions

View File

@ -1,10 +1,9 @@
language: go
go:
- 1.14.x
- 1.15.x
- 1.18.x
before_install:
# download super-linter: golangci-lint
- curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest
script:
- go test ./...
- golangci-lint run --disable errcheck

View File

@ -198,9 +198,8 @@ func (u *DatadogUnifi) Run(c poller.Collect) error {
u.LogErrorf("DataDog config is missing and is not disabled: Datadog output is disabled!")
return nil
}
u.Logf("Datadog is configured.")
u.Collector = c
u.Logf("Datadog is configured.")
u.setConfigDefaults()
var err error