// Local helpers for snapshot_test.go — production code does not see them. package catalog import ( "os" ) func os2WriteFile(path string, data []byte, perm os.FileMode) error { return os.WriteFile(path, data, perm) } func os2Stat(path string) (os.FileInfo, error) { return os.Stat(path) } // appendP appends a Projection keyed by its own SKU — the producer/test pattern // over the now-generic SnapshotWriter[Projection] (Append takes an explicit key). func appendP(w *SnapshotWriter[Projection], p Projection) error { return w.Append(p.SKU, p) } func repeat32(s string, n int) string { out := make([]byte, 0, n*len(s)) for i := 0; i < n; i++ { out = append(out, s...) } return string(out) }