refactor(10.2-01): nest framework packages under modules

- Move remaining beach packages and embedded admin assets\n- Rewrite framework, example, build, and gate paths
This commit is contained in:
Jakub Zych
2026-09-28 02:21:02 +02:00
parent ac1f6d14f4
commit 5e50b166ef
277 changed files with 303 additions and 303 deletions

53
modules/tide/report.go Normal file
View File

@@ -0,0 +1,53 @@
package tide
import (
"fmt"
"strconv"
)
// Coverage is the recorded/passing/failing/unrecorded table over manifest routes.
type Coverage struct {
Total int
Recorded int
Passing int
Failing int
Unrecorded int
Pending int
Ported int
ResumeRemaining int
Rows []CoverageRow
Diffs []string
}
// CoverageRow is one manifest route's outcome.
type CoverageRow struct {
ID string
Status string
Outcome string
}
// CoverageHeaders is the table header for CLI output.
func CoverageHeaders() []string {
return []string{"route", "status", "outcome"}
}
// CoverageRows renders the coverage table.
func (c Coverage) CoverageRows() [][]string {
rows := make([][]string, 0, len(c.Rows))
for _, r := range c.Rows {
rows = append(rows, []string{r.ID, r.Status, r.Outcome})
}
return rows
}
// SummaryLine is a one-line recorded/passing/failing/unrecorded report.
func (c Coverage) SummaryLine() string {
return fmt.Sprintf("recorded %d/%d passing %d failing %d unrecorded %d", c.Recorded, c.Total, c.Passing, c.Failing, c.Unrecorded)
}
func (c Coverage) ResumeLine() string {
if c.ResumeRemaining <= 0 {
return "manifest recording complete"
}
return "resume remaining " + strconv.Itoa(c.ResumeRemaining)
}