From 04c5b4908538cdc05f05bc92caebcff192201f91 Mon Sep 17 00:00:00 2001 From: steverusso Date: Sun, 28 Dec 2025 14:49:45 -0500 Subject: [PATCH] some minor doc fixes --- client.go | 8 ++++---- request-attrs.go | 4 ++-- request-interfaces.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client.go b/client.go index 307a35ea..f8c139e4 100644 --- a/client.go +++ b/client.go @@ -295,7 +295,7 @@ func newClientPipe(rd, stderr io.Reader, wr io.WriteCloser, wait func() error, o // Create creates the named file mode 0666 (before umask), truncating it if it // already exists. If successful, methods on the returned File can be used for // I/O; the associated file descriptor has mode O_RDWR. If you need more -// control over the flags/mode used to open the file see client.OpenFile. +// control over the flags/mode used to open the file, see [Client.OpenFile]. // // Note that some SFTP servers (eg. AWS Transfer) do not support opening files // read/write at the same time. For those services you will need to use @@ -1033,8 +1033,8 @@ func (c *Client) MkdirAll(path string) error { return nil } -// RemoveAll delete files recursively in the directory and Recursively delete subdirectories. -// An error will be returned if no file or directory with the specified path exists +// RemoveAll delete files recursively in the directory and recursively delete subdirectories. +// An error will be returned if no file or directory with the specified path exists. func (c *Client) RemoveAll(path string) error { // Get the file/directory information @@ -2142,7 +2142,7 @@ func (f *File) Chown(uid, gid int) error { // Chmod changes the permissions of the current file. // -// See Client.Chmod for details. +// See [Client.Chmod] for details. func (f *File) Chmod(mode os.FileMode) error { f.mu.RLock() defer f.mu.RUnlock() diff --git a/request-attrs.go b/request-attrs.go index 476c5651..d239f950 100644 --- a/request-attrs.go +++ b/request-attrs.go @@ -4,7 +4,7 @@ package sftp // Attr(ibutes) byte blob easier. Use Pflags() when working with an Open/Write // request and AttrFlags() and Attributes() when working with SetStat requests. -// FileOpenFlags defines Open and Write Flags. Correlate directly with with os.OpenFile flags +// FileOpenFlags defines Open and Write Flags. Correlate directly with os.OpenFile flags // (https://golang.org/pkg/os/#pkg-constants). type FileOpenFlags struct { Read, Write, Append, Creat, Trunc, Excl bool @@ -44,7 +44,7 @@ func newFileAttrFlags(flags uint32) FileAttrFlags { } // AttrFlags returns a FileAttrFlags boolean struct based on the -// bitmap/uint32 file attribute flags from the SFTP packaet. +// bitmap/uint32 file attribute flags from the SFTP packet. func (r *Request) AttrFlags() FileAttrFlags { return newFileAttrFlags(r.Flags) } diff --git a/request-interfaces.go b/request-interfaces.go index 13e7577e..79e80bd9 100644 --- a/request-interfaces.go +++ b/request-interfaces.go @@ -20,7 +20,7 @@ type WriterAtReaderAt interface { // The request.Method attribute is initially the most important one as it // determines which Handler gets called. -// FileReader should return an io.ReaderAt for the filepath +// FileReader should return an io.ReaderAt for the filepath. // Note in cases of an error, the error text will be sent to the client. // Called for Methods: Get type FileReader interface { @@ -48,7 +48,7 @@ type OpenFileWriter interface { OpenFile(*Request) (WriterAtReaderAt, error) } -// FileCmder should return an error +// FileCmder should return an error. // Note in cases of an error, the error text will be sent to the client. // Called for Methods: Setstat, Rename, Rmdir, Mkdir, Link, Symlink, Remove type FileCmder interface { @@ -71,7 +71,7 @@ type StatVFSFileCmder interface { StatVFS(*Request) (*StatVFS, error) } -// FileLister should return an object that fulfils the ListerAt interface +// FileLister should return an object that fulfils the ListerAt interface. // Note in cases of an error, the error text will be sent to the client. // Called for Methods: List, Stat, Readlink //