mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-08-01 07:34:49 +00:00
feat: return errors if filter specified by flag does not exist.
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
parent
21dc61c04f
commit
dd5824f436
@ -3,6 +3,7 @@ package analysis
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@ -72,6 +73,8 @@ func (a *Analysis) RunAnalysis() error {
|
||||
return err
|
||||
}
|
||||
a.Results = append(a.Results, results...)
|
||||
} else {
|
||||
return errors.New(fmt.Sprintf("\"%s\" filter does not exist. Please run k8sgpt filters list.", filter))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user