Skip to content

Commit

Permalink
fix the type, and we can pre-allocate the whole slice
Browse files Browse the repository at this point in the history
  • Loading branch information
puellanivis committed Aug 2, 2021
1 parent 94523b9 commit 889ffca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ func filelist(h FileLister, r *Request, pkt requestPacket) responsePacket {
return statusFromError(pkt.id(), err)
}

var nameAttrs []sshFxpNameAttr
nameAttrs := make([]*sshFxpNameAttr, 0, len(finfo))

for _, fi := range finfo {
nameAttrs = append(nameAttrs, &sshFxpNameAttr{
Expand Down

0 comments on commit 889ffca

Please sign in to comment.