0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

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")
}
}
// 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

View file

@ -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)
}