feat: add list command with global filters
This commit is contained in:
20
internal/listing/summary.go
Normal file
20
internal/listing/summary.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package listing
|
||||
|
||||
import "strings"
|
||||
|
||||
// EmptyResultMessage returns a contextual message when no entries match.
|
||||
func EmptyResultMessage(req *ListingRequest) string {
|
||||
if req == nil {
|
||||
return "No entries matched the provided filters."
|
||||
}
|
||||
|
||||
if len(req.Extensions) > 0 {
|
||||
return "No entries matched extensions: " + strings.Join(req.Extensions, ", ")
|
||||
}
|
||||
|
||||
if req.IncludeHidden {
|
||||
return "No entries matched the provided filters (including hidden files)."
|
||||
}
|
||||
|
||||
return "No entries matched the provided filters."
|
||||
}
|
||||
Reference in New Issue
Block a user