From 5b90efd8477f05ff5d8c0996c9dc7a9bb5719cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20de=20Metz?= Date: Thu, 2 Jun 2016 21:39:10 +0200 Subject: [PATCH] Check for CanInterface. --- plugins/inputs/webhooks/webhooks.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/inputs/webhooks/webhooks.go b/plugins/inputs/webhooks/webhooks.go index e89da4401..d8c74850a 100644 --- a/plugins/inputs/webhooks/webhooks.go +++ b/plugins/inputs/webhooks/webhooks.go @@ -74,6 +74,10 @@ func (wb *Webhooks) AvailableWebhooks() []Webhook { for i := 0; i < s.NumField(); i++ { f := s.Field(i) + if !f.CanInterface() { + continue + } + if wbPlugin, ok := f.Interface().(Webhook); ok { if !reflect.ValueOf(wbPlugin).IsNil() { webhooks = append(webhooks, wbPlugin)