-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
beginner-friendlyenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededtuiTerminal User InterfaceTerminal User Interface
Description
Key points:
- Add error field to CacheModel struct as in
views/rules - Display error message after scanning
- Clear error on new scan
- Use existing errors package
- Follow the same pattern as in rules view
Implementation steps:
- Add error field to CacheModel:
type CacheModel struct {
// ... existing fields ...
Error *errors.Error
}- Update error handling in scan function:
if err := cache.ClearCache(); err != nil {
model.Error = errors.New(errors.ErrorTypeValidation, err.Error("Not all files were successfully deleted"))
}- Add error display in View():
if model.Error != nil && m.Error.IsVisible() {
return styles.ErrorStyle.Render(model.Error.Message)
}- Clear error on new scan:
model.ErrorMetadata
Metadata
Assignees
Labels
beginner-friendlyenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededtuiTerminal User InterfaceTerminal User Interface