mirror of
https://github.com/restic/restic.git
synced 2026-08-05 21:33:16 +00:00
Apply go fix -minmax ./...
This commit is contained in:
@@ -131,11 +131,7 @@ func childMatch(pattern Pattern, strs []string) (matched bool, err error) {
|
||||
|
||||
// match path against absolute pattern prefix
|
||||
l := 0
|
||||
if len(strs) > len(pattern.parts) {
|
||||
l = len(pattern.parts)
|
||||
} else {
|
||||
l = len(strs)
|
||||
}
|
||||
l = min(len(strs), len(pattern.parts))
|
||||
return match(Pattern{pattern.original, pattern.parts[0:l], pattern.isNegated}, strs)
|
||||
}
|
||||
|
||||
|
||||
@@ -132,10 +132,7 @@ func TestReadRecords(t *testing.T) {
|
||||
testReadRecords := func(dataSize, entryCount, totalRecords int) {
|
||||
totalHeader := rtest.Random(0, totalRecords*int(entrySize)+crypto.Extension)
|
||||
bufSize := entryCount*int(entrySize) + crypto.Extension
|
||||
off := len(totalHeader) - bufSize
|
||||
if off < 0 {
|
||||
off = 0
|
||||
}
|
||||
off := max(len(totalHeader)-bufSize, 0)
|
||||
expectedHeader := totalHeader[off:]
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
Reference in New Issue
Block a user