pkg / sftp

SFTP support for the go.crypto/ssh package
BSD 2-Clause "Simplified" License
1.52k stars 380 forks source link

Clean up matching/globbing code #416

Closed greatroar closed 3 years ago

greatroar commented 3 years ago

scanChunk and matchChunk were unused leftovers from the old Match implementation, removed in 4f3e725e885c021085d2fb8a9cc26e30ea1a992f.

isPathSeparator contained a useless cast to string.

The documentation (copied from path/filepath) referred to a Separator constant, which is not present in the package.

greatroar commented 3 years ago

I just removed getEsc as well. It was only called by matchChunk. And I caught a bug in Glob, for which I added a fix and a test.