From a73b7973531f2b8632269a8c8359acf69ee61f45 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 13 May 2026 14:28:43 +0300 Subject: add compile-time interface assertions for public types (task c4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- internal/file/file.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/file') 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) -- cgit v1.2.3