summaryrefslogtreecommitdiff
path: root/internal/file
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-13 14:28:43 +0300
committerPaul Buetow <paul@buetow.org>2026-05-13 14:28:43 +0300
commita73b7973531f2b8632269a8c8359acf69ee61f45 (patch)
tree5f9e96b893fcf1a2ca774c76276a07ecfa565711 /internal/file
parent27b94f917064948fa33141309a3f08deb40ffde2 (diff)
add compile-time interface assertions for public types (task c4)
Extend the var _ Interface = (*Concrete)(nil) coverage started in j3 to cover the remaining public types not yet guarded: - *file.FdFile → file.File (file/file.go) - streamrow.Row → globalfilter.Candidate (streamrow/row.go; adds globalfilter import — no cycle since globalfilter does not import streamrow) - *streamrow.RingBuffer → eventstream.Source (tui/eventstream/ringbuffer.go; already a type alias for streamrow.RingBuffer) - *probemanager.Manager → tui/probes.Manager (tui/probes/model.go) - All 9 generated *types.*Event types → event.Event in the new file internal/event/interface_assertions.go (non-generated, lives in the event package which already imports types, so no new import cycle) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/file')
-rw-r--r--internal/file/file.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/file/file.go b/internal/file/file.go
index fc9c320..f933d69 100644
--- a/internal/file/file.go
+++ b/internal/file/file.go
@@ -217,3 +217,11 @@ func (f pathnameFile) String() string {
return sb.String()
}
+
+// --- compile-time interface satisfaction assertions ---
+//
+// *FdFile is the primary public implementation of File used throughout the
+// codebase. The assertion causes a build error if FdFile drifts out of sync
+// with the File interface contract.
+
+var _ File = (*FdFile)(nil)