[#1059] pilorama: Pass linter check
All checks were successful
DCO action / DCO (pull_request) Successful in 1m16s
Build / Build Components (1.21) (pull_request) Successful in 3m16s
Vulncheck / Vulncheck (pull_request) Successful in 3m35s
Build / Build Components (1.20) (pull_request) Successful in 5m8s
Tests and linters / gopls check (pull_request) Successful in 6m42s
Tests and linters / Staticcheck (pull_request) Successful in 6m48s
Tests and linters / Lint (pull_request) Successful in 7m25s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m34s
Tests and linters / Tests with -race (pull_request) Successful in 8m43s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m5s
All checks were successful
DCO action / DCO (pull_request) Successful in 1m16s
Build / Build Components (1.21) (pull_request) Successful in 3m16s
Vulncheck / Vulncheck (pull_request) Successful in 3m35s
Build / Build Components (1.20) (pull_request) Successful in 5m8s
Tests and linters / gopls check (pull_request) Successful in 6m42s
Tests and linters / Staticcheck (pull_request) Successful in 6m48s
Tests and linters / Lint (pull_request) Successful in 7m25s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m34s
Tests and linters / Tests with -race (pull_request) Successful in 8m43s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m5s
funlen 'TreeSortedByFilename' is too long (81 > 80) Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
parent
b595ba2992
commit
ed2377307d
1 changed files with 1 additions and 2 deletions
|
@ -1074,8 +1074,7 @@ func (t *boltForest) TreeSortedByFilename(ctx context.Context, cid cidSDK.ID, tr
|
||||||
})
|
})
|
||||||
for i := range result {
|
for i := range result {
|
||||||
if cmp := bytes.Compare([]byte(last), result[i].Meta.GetAttr(AttributeFilename)); cmp <= 0 {
|
if cmp := bytes.Compare([]byte(last), result[i].Meta.GetAttr(AttributeFilename)); cmp <= 0 {
|
||||||
// if last == result[i], return next [i+1:] values
|
// if last == result[i], return next [i+1:] values; if last < result[i], return all values from [i:]
|
||||||
// if last < result[i], return all values from [i:]
|
|
||||||
result = result[i+cmp+1:]
|
result = result[i+cmp+1:]
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue