From 1c6583f925976e73cf5066119047f772a1824d90 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 5 Aug 2022 20:41:18 +0800 Subject: [PATCH] fix some typos Signed-off-by: cui fliter --- src/croc/croc.go | 8 ++++---- src/croc/croc_test.go | 4 ++-- src/install/default.txt | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/croc/croc.go b/src/croc/croc.go index 2f18c74..dfa813d 100644 --- a/src/croc/croc.go +++ b/src/croc/croc.go @@ -208,7 +208,7 @@ func New(ops Options) (c *Client, err error) { panic("Could not parse given Upload Limit") } } - // Somehow 4* is neccessary + // Somehow 4* is necessary rt = rate.Every(time.Second / (4 * time.Duration(uploadLimit))) if int(uploadLimit) > minBurstSize { minBurstSize = int(uploadLimit) @@ -250,9 +250,9 @@ func isEmptyFolder(folderPath string) (bool, error) { } // This function retrives the important file informations -// for every file that will be transfered +// for every file that will be transferred func GetFilesInfo(fnames []string, zipfolder bool) (filesInfo []FileInfo, emptyFolders []FileInfo, totalNumberFolders int, err error) { - // fnames: the relativ/absolute paths of files/folders that will be transfered + // fnames: the relativ/absolute paths of files/folders that will be transferred totalNumberFolders = 0 var paths []string for _, fname := range fnames { @@ -1078,7 +1078,7 @@ func (c *Client) processMessageFileInfo(m message.Message) (done bool, err error } } - // if no files are to be transfered, then we can end the file transfer process + // if no files are to be transferred, then we can end the file transfer process if c.FilesToTransfer == nil { c.SuccessfulTransfer = true c.Step3RecipientRequestFile = true diff --git a/src/croc/croc_test.go b/src/croc/croc_test.go index 6b9847a..36e7eb7 100644 --- a/src/croc/croc_test.go +++ b/src/croc/croc_test.go @@ -353,7 +353,7 @@ func TestCleanUp(t *testing.T) { for _, file := range []string{"README.md", "./README.md"} { err = os.Remove(file) if err == nil { - log.Debugf("Successfuly purged %s", file) + log.Debugf("Successfully purged %s", file) } else { log.Debugf("%s was already purged.", file) } @@ -361,7 +361,7 @@ func TestCleanUp(t *testing.T) { for _, folder := range []string{"./testEmpty", "./link-in-folder"} { err = os.RemoveAll(folder) if err == nil { - log.Debugf("Successfuly purged %s", folder) + log.Debugf("Successfully purged %s", folder) } else { log.Debugf("%s was already purged.", folder) } diff --git a/src/install/default.txt b/src/install/default.txt index 97ace4d..98eeaec 100644 --- a/src/install/default.txt +++ b/src/install/default.txt @@ -86,7 +86,7 @@ print_help() { Default = /usr/local/bin ('\${PREFIX}/bin' on Termux for Android) -h - Prints this helpfull message and exit." + Prints this helpful message and exit." echo "${help_header}" echo "" @@ -300,10 +300,10 @@ checksum_check() { #--- FUNCTION ---------------------------------------------------------------- # NAME: extract_file # DESCRIPTION: Extracts a file into a location. Attempts to determine which -# tool to use by checking file extention. +# tool to use by checking file extension. # PARAMETERS: $1 = file to extract # $2 = location to extract file into -# $3 = extention +# $3 = extension # RETURNS: Return code of the tool used to extract the file # 20 = Failed to determine which tool to use # 30 = Failed to find tool in path