I misjudged the linter warning in
5141405 (Update dependencies, static
checkers and Go to 1.24, 2025-10-17). rand.Seed is a no-op since 1.24.
The test works fine without a static seed.
import (
"fmt"
"io/fs"
- "math/rand"
"os"
"regexp"
"testing"
t.Fatal(err)
}
- // Deterministic temporary symlink names
- rand.Seed(0) //nolint:staticcheck // SA1019 need fixed seed
-
var changed bool
err = s.syncFile(tc.file, &changed)
testutil.AssertErrorEqual(t, "err", err, tc.expErr)