mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-16 03:49:52 +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 {
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user