23 lines
449 B
Go
23 lines
449 B
Go
// 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)
|
|
}
|
|
|
|
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)
|
|
}
|