Skip to content

Commit

Permalink
fix: remove duplicate error message
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulguptajss authored and cgrinds committed Jul 20, 2023
1 parent 4b66863 commit ab34aa2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/collectors/zapi/plugins/shelf/shelf.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (my *Shelf) Init() error {

objects := my.Params.GetChildS("objects")
if objects == nil {
return errs.New(errs.ErrMissingParams, "objects")
return errs.New(errs.ErrMissingParam, "objects")
}

for _, obj := range objects.GetChildren() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/collectors/zapiperf/plugins/disk/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (d *Disk) Init() error {

objects := d.Params.GetChildS("objects")
if objects == nil {
return errs.New(errs.ErrMissingParams, "objects")
return errs.New(errs.ErrMissingParam, "objects")
}

for _, obj := range objects.GetChildren() {
Expand Down
1 change: 0 additions & 1 deletion pkg/errs/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const (
ErrInvalidItem = harvestError("invalid item")
ErrInvalidParam = harvestError("invalid parameter")
ErrMissingParam = harvestError("missing parameter")
ErrMissingParams = harvestError("missing parameter")
ErrNoCollector = harvestError("no collectors")
ErrNoInstance = harvestError("no instances")
ErrNoMetric = harvestError("no metrics")
Expand Down

0 comments on commit ab34aa2

Please sign in to comment.