From d2cb4df84e15d11288b13fc16d207ac38ca5838c Mon Sep 17 00:00:00 2001 From: Cassondra Foesch Date: Wed, 13 Nov 2024 21:31:18 +0000 Subject: [PATCH] ancilliary breaks --- .github/workflows/CI.yml | 5 +---- client.go | 6 +++--- errno_plan9.go | 2 +- localfs/statvfs/statvfs_plan9.go | 4 ++-- localfs/statvfs/statvfs_stubs.go | 4 ++-- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0098a2d4..a8a8c55b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,10 +12,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - go: ['1.23', '1.22'] - exclude: - - os: macos-latest - go: '1.22' + go: ['1.23'] steps: - uses: actions/checkout@v4 diff --git a/client.go b/client.go index 208b4b00..eccabf6d 100644 --- a/client.go +++ b/client.go @@ -1217,7 +1217,7 @@ const ( OpenFlagReadOnly = os.O_RDONLY OpenFlagWriteOnly = os.O_WRONLY OpenFlagReadWrite = os.O_RDWR - // The remaining values may be or’ed in to control behavior. + // The remaining values may be or'ed in to control behavior. OpenFlagAppend = os.O_APPEND OpenFlagCreate = os.O_CREATE OpenFlagTruncate = os.O_TRUNC @@ -1552,7 +1552,7 @@ func (f *File) writeat(ctx context.Context, b []byte, off int64) (written int, e return int(written), f.wrapErr("writeat", firstErr.err) } - // We didn’t hit any errors, so we must have written all the bytes in the buffer. + // We didn't hit any errors, so we must have written all the bytes in the buffer. written = len(b) f.offset += int64(written) @@ -1792,7 +1792,7 @@ func (f *File) ReadFrom(r io.Reader) (read int64, err error) { return read, f.wrapErr("readfrom", firstErr.err) } - // We didn’t hit any errors, so we must have written all the bytes that we read until EOF. + // We didn't hit any errors, so we must have written all the bytes that we read until EOF. f.offset += read return read, nil } diff --git a/errno_plan9.go b/errno_plan9.go index a5840854..3c530658 100644 --- a/errno_plan9.go +++ b/errno_plan9.go @@ -18,7 +18,7 @@ func translateErrorString(errno syscall.ErrorString) sshfx.Status { case syscall.EACCES, syscall.EPERM: return sshfx.StatusPermissionDenied case syscall.EPLAN9: - return sshfx.StatusOPUnsupported + return sshfx.StatusOpUnsupported } return sshfx.StatusFailure diff --git a/localfs/statvfs/statvfs_plan9.go b/localfs/statvfs/statvfs_plan9.go index da85aed7..bdc04f07 100644 --- a/localfs/statvfs/statvfs_plan9.go +++ b/localfs/statvfs/statvfs_plan9.go @@ -7,10 +7,10 @@ import ( "github.com/pkg/sftp/v2/encoding/ssh/filexfer/openssh" ) -// StatVFS stubs the OpenSSH StatVFS with an sshfx.StatusOPUnsupported Status. +// StatVFS stubs the OpenSSH StatVFS with an sshfx.StatusOpUnsupported Status. func StatVFS(name string) (*openssh.StatVFSExtendedReplyPacket, error) { return nil, &sshfx.StatusPacket{ - StatusCode: sshfx.StatusOPUnsupported, + StatusCode: sshfx.StatusOpUnsupported, ErrorMessage: syscall.EPLAN9.Error(), } } diff --git a/localfs/statvfs/statvfs_stubs.go b/localfs/statvfs/statvfs_stubs.go index 73da61bc..7d66aafe 100644 --- a/localfs/statvfs/statvfs_stubs.go +++ b/localfs/statvfs/statvfs_stubs.go @@ -10,10 +10,10 @@ import ( "github.com/pkg/sftp/v2/encoding/ssh/filexfer/openssh" ) -// StatVFS stubs the OpenSSH StatVFS with an sshfx.StatusOPUnsupported Status. +// StatVFS stubs the OpenSSH StatVFS with an sshfx.StatusOpUnsupported Status. func StatVFS(name string) (*openssh.StatVFSExtendedReplyPacket, error) { return nil, &sshfx.StatusPacket{ - StatusCode: sshfx.StatusOPUnsupported, + StatusCode: sshfx.StatusOpUnsupported, ErrorMessage: "not supported by " + runtime.GOOS, } }