Skip to content

Commit

Permalink
rename ErrUnknown to ErrUnknownInput
Browse files Browse the repository at this point in the history
  • Loading branch information
urso committed Jun 17, 2020
1 parent 85b248f commit e00fe44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions filebeat/input/v2/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ type SetupError struct {
Fails []error
}

// ErrUnknown indicates that the plugin type does not exist. Either
// ErrUnknownInput indicates that the plugin type does not exist. Either
// because the 'type' setting name does not match the loaders expectations,
// or because the type is unknown.
var ErrUnknown = errors.New("unknown input type")
var ErrUnknownInput = errors.New("unknown input type")

// ErrNoInputConfigured indicates that the 'type' setting is missing.
var ErrNoInputConfigured = errors.New("no input type configured")
Expand All @@ -56,7 +56,7 @@ var ErrPluginWithoutName = errors.New("the plugin has no name")

// IsUnknownInputError checks if an error value indicates an input load
// error because there is no existing plugin that can create the input.
func IsUnknownInputError(err error) bool { return errors.Is(err, ErrUnknown) }
func IsUnknownInputError(err error) bool { return errors.Is(err, ErrUnknownInput) }

func failedInputName(err error) string {
switch e := err.(type) {
Expand Down
2 changes: 1 addition & 1 deletion filebeat/input/v2/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (l *Loader) Configure(cfg *common.Config) (Input, error) {

p, exists := l.registry[name]
if !exists {
return nil, &LoadError{Name: name, Reason: ErrUnknown}
return nil, &LoadError{Name: name, Reason: ErrUnknownInput}
}

log := l.log.With("input", name, "stability", p.Stability, "deprecated", p.Deprecated)
Expand Down

0 comments on commit e00fe44

Please sign in to comment.