fix some typos

Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
cui fliter 2022-08-05 20:41:18 +08:00
parent 1851327df7
commit 1c6583f925
3 changed files with 9 additions and 9 deletions

View File

@ -208,7 +208,7 @@ func New(ops Options) (c *Client, err error) {
panic("Could not parse given Upload Limit") panic("Could not parse given Upload Limit")
} }
} }
// Somehow 4* is neccessary // Somehow 4* is necessary
rt = rate.Every(time.Second / (4 * time.Duration(uploadLimit))) rt = rate.Every(time.Second / (4 * time.Duration(uploadLimit)))
if int(uploadLimit) > minBurstSize { if int(uploadLimit) > minBurstSize {
minBurstSize = int(uploadLimit) minBurstSize = int(uploadLimit)
@ -250,9 +250,9 @@ func isEmptyFolder(folderPath string) (bool, error) {
} }
// This function retrives the important file informations // 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) { 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 totalNumberFolders = 0
var paths []string var paths []string
for _, fname := range fnames { 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 { if c.FilesToTransfer == nil {
c.SuccessfulTransfer = true c.SuccessfulTransfer = true
c.Step3RecipientRequestFile = true c.Step3RecipientRequestFile = true

View File

@ -353,7 +353,7 @@ func TestCleanUp(t *testing.T) {
for _, file := range []string{"README.md", "./README.md"} { for _, file := range []string{"README.md", "./README.md"} {
err = os.Remove(file) err = os.Remove(file)
if err == nil { if err == nil {
log.Debugf("Successfuly purged %s", file) log.Debugf("Successfully purged %s", file)
} else { } else {
log.Debugf("%s was already purged.", file) log.Debugf("%s was already purged.", file)
} }
@ -361,7 +361,7 @@ func TestCleanUp(t *testing.T) {
for _, folder := range []string{"./testEmpty", "./link-in-folder"} { for _, folder := range []string{"./testEmpty", "./link-in-folder"} {
err = os.RemoveAll(folder) err = os.RemoveAll(folder)
if err == nil { if err == nil {
log.Debugf("Successfuly purged %s", folder) log.Debugf("Successfully purged %s", folder)
} else { } else {
log.Debugf("%s was already purged.", folder) log.Debugf("%s was already purged.", folder)
} }

View File

@ -86,7 +86,7 @@ print_help() {
Default = /usr/local/bin ('\${PREFIX}/bin' on Termux for Android) Default = /usr/local/bin ('\${PREFIX}/bin' on Termux for Android)
-h -h
Prints this helpfull message and exit." Prints this helpful message and exit."
echo "${help_header}" echo "${help_header}"
echo "" echo ""
@ -300,10 +300,10 @@ checksum_check() {
#--- FUNCTION ---------------------------------------------------------------- #--- FUNCTION ----------------------------------------------------------------
# NAME: extract_file # NAME: extract_file
# DESCRIPTION: Extracts a file into a location. Attempts to determine which # 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 # PARAMETERS: $1 = file to extract
# $2 = location to extract file into # $2 = location to extract file into
# $3 = extention # $3 = extension
# RETURNS: Return code of the tool used to extract the file # RETURNS: Return code of the tool used to extract the file
# 20 = Failed to determine which tool to use # 20 = Failed to determine which tool to use
# 30 = Failed to find tool in path # 30 = Failed to find tool in path