From c78b30591644d4b7ab7b68b7ccba978e4f702bc8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 7 Mar 2025 22:39:05 +0200 Subject: more on filters, needs more testing --- internal/file.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'internal/file.go') diff --git a/internal/file.go b/internal/file.go index efb570b..fe519ba 100644 --- a/internal/file.go +++ b/internal/file.go @@ -9,6 +9,7 @@ import ( type file interface { String() string + Name() string } type fdFile struct { @@ -27,6 +28,10 @@ func newFdFileWithPid(fd int32, pid uint32) fdFile { return fdFile{fd, "?"} } +func (f fdFile) Name() string { + return f.name +} + func (f fdFile) String() string { var sb strings.Builder @@ -46,6 +51,10 @@ type oldnameNewnameFile struct { oldname, newname string } +func (f oldnameNewnameFile) Name() string { + return f.newname +} + func (f oldnameNewnameFile) String() string { var sb strings.Builder @@ -61,6 +70,10 @@ type pathnameFile struct { pathname string } +func (f pathnameFile) Name() string { + return f.pathname +} + func (f pathnameFile) String() string { var sb strings.Builder -- cgit v1.2.3