mirror of
https://github.com/weaveworks/scope.git
synced 2026-08-18 20:07:06 +00:00
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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user