Give maxLen its own literal and repeats MaxRepeat; arg errors name the spelling and the range; write's comment says what Flush reports; assert 64-bit at compile time
Tests / vet + fmt + tests (pull_request) Successful in 59s
Tests / vet + fmt + tests (push) Successful in 6s

This commit was merged in pull request #3.
This commit is contained in:
2026-09-02 19:25:19 +02:00
parent a9552ed966
commit addba9abf7
7 changed files with 55 additions and 31 deletions
+5 -2
View File
@@ -28,9 +28,12 @@ import (
//go:embed data
var shippedFS embed.FS
// MaxRepeat caps a repeat, and the renders nested repeats multiply to along any path.
// MaxRepeat caps a repeat, and the renders nested repeats multiply to along any
// path; the CLI's --repeat shares it.
const MaxRepeat = 1 << 20
var _ [^uint(0)>>63 - 1]struct{} // 64-bit only, per the README's Decisions
// ErrNoData is returned by New when no source is loaded at all.
var ErrNoData = errors.New("no data: WithoutShippedData needs at least one WithDataPath or WithDataFS")
@@ -207,7 +210,7 @@ func join(prefix, name string) string {
return prefix + "." + name
}
// randomBytes seeds an unseeded generator; a failure is an error, never a fixed seed.
// randomBytes seeds an unseeded generator.
var randomBytes = crand.Read
func newRand(seed uint64, seeded bool) (*session, error) {