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.
This commit is contained in:
Krzesimir Nowak
2016-08-12 17:03:42 +02:00
parent 9d48fdc32c
commit 993eebeea9
-2
View File
@@ -283,8 +283,6 @@ func (p *Plugin) Report() (result report.Report, err error) {
switch { switch {
case spec.APIVersion != p.expectedAPIVersion: case spec.APIVersion != p.expectedAPIVersion:
err = fmt.Errorf("incorrect API version: expected %q, got %q", p.expectedAPIVersion, spec.APIVersion) 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 == "": case spec.Label == "":
err = fmt.Errorf("spec must contain a label") err = fmt.Errorf("spec must contain a label")
case !foundReporter: case !foundReporter: