Skip to content

Commit

Permalink
ancilliary breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
puellanivis committed Nov 13, 2024
1 parent f7eb322 commit d2cb4df
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ const (
OpenFlagReadOnly = os.O_RDONLY
OpenFlagWriteOnly = os.O_WRONLY
OpenFlagReadWrite = os.O_RDWR
// The remaining values may be ored 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
Expand Down Expand Up @@ -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 didnt 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)

Expand Down Expand Up @@ -1792,7 +1792,7 @@ func (f *File) ReadFrom(r io.Reader) (read int64, err error) {
return read, f.wrapErr("readfrom", firstErr.err)
}

// We didnt 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
}
Expand Down
2 changes: 1 addition & 1 deletion errno_plan9.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions localfs/statvfs/statvfs_plan9.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
4 changes: 2 additions & 2 deletions localfs/statvfs/statvfs_stubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

0 comments on commit d2cb4df

Please sign in to comment.