From 993eebeea925b3a5ecfcda5e3def1e2bcad5b3c8 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 15 Jul 2016 18:00:50 +0200 Subject: [PATCH] Remove impossible case of an empty plugin ID Plugin ID must be non-empty when the plugin is created and the followup reports cannot change it. --- probe/plugins/registry.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/probe/plugins/registry.go b/probe/plugins/registry.go index 7f0e2f8c9..e8447d173 100644 --- a/probe/plugins/registry.go +++ b/probe/plugins/registry.go @@ -283,8 +283,6 @@ func (p *Plugin) Report() (result report.Report, err error) { switch { case spec.APIVersion != p.expectedAPIVersion: err = fmt.Errorf("incorrect API version: expected %q, got %q", p.expectedAPIVersion, spec.APIVersion) - case spec.ID == "": - err = fmt.Errorf("spec must contain an id") case spec.Label == "": err = fmt.Errorf("spec must contain a label") case !foundReporter: