Answer architecture round 1: one invariant phrase in internal/invariant, held across every package, Source built by Dir and FS, coverage counted across packages, and file items 112 and 113

This commit is contained in:
2026-10-05 15:44:38 +02:00
committed by Lillem4n
parent 835cdb57d4
commit dd2fe61b13
26 changed files with 144 additions and 95 deletions
+4 -2
View File
@@ -4,6 +4,8 @@ import (
"fmt"
"slices"
"sort"
"github.com/larvit/fejkdata/internal/invariant"
)
// eachNode visits n and every node contained within it once, passing the dot path
@@ -65,7 +67,7 @@ func contained(n node) []namedNode {
case *nullItem, *tableRow:
return nil
default:
panic(internalError("contained has no case for node %T", n))
panic(invariant.Broken("contained has no case for node %T", n))
}
}
@@ -127,7 +129,7 @@ func renderEdges(n node) []renderEdge {
case *folder, *nullItem:
return nil
default:
panic(internalError("renderEdges has no case for node %T", n))
panic(invariant.Broken("renderEdges has no case for node %T", n))
}
}