@@ -289,7 +289,7 @@ func (fs *MegaFS) GetChildren(n *Node) ([]*Node, error) {
289289 return node .getChildren (), nil
290290}
291291
292- // Retreive all the nodes in the given node tree path by name
292+ // Retrieve all the nodes in the given node tree path by name
293293// This method returns array of nodes upto the matched subpath
294294// (in same order as input names array) even if the target node is not located.
295295func (fs * MegaFS ) PathLookup (root * Node , ns []string ) ([]* Node , error ) {
@@ -421,7 +421,7 @@ func (m *Mega) api_request(r []byte) (buf []byte, err error) {
421421 url = fmt .Sprintf ("%s&sid=%s" , url , m .sid )
422422 }
423423
424- sleepTime := minSleepTime // inital backoff time
424+ sleepTime := minSleepTime // initial backoff time
425425 for i := 0 ; i < m .retries + 1 ; i ++ {
426426 if i != 0 {
427427 m .debugf ("Retry API request %d/%d: %v" , i , m .retries , err )
@@ -1150,7 +1150,7 @@ func (d *Download) DownloadChunk(id int) (chunk []byte, err error) {
11501150
11511151 var resp * http.Response
11521152 chunk_url := fmt .Sprintf ("%s/%d-%d" , d .resourceUrl , chk_start , chk_start + int64 (chk_size )- 1 )
1153- sleepTime := minSleepTime // inital backoff time
1153+ sleepTime := minSleepTime // initial backoff time
11541154 for retry := 0 ; retry < d .m .retries + 1 ; retry ++ {
11551155 resp , err = d .m .client .Get (chunk_url )
11561156 if err == nil {
@@ -1499,7 +1499,7 @@ func (u *Upload) UploadChunk(id int, chunk []byte) (err error) {
14991499 ctr_aes .XORKeyStream (chunk , chunk )
15001500 chk_url := fmt .Sprintf ("%s/%d" , u .uploadUrl , chk_start )
15011501
1502- sleepTime := minSleepTime // inital backoff time
1502+ sleepTime := minSleepTime // initial backoff time
15031503 for retry := 0 ; retry < u .m .retries + 1 ; retry ++ {
15041504 reader := bytes .NewBuffer (chunk )
15051505 req , err = http .NewRequest ("POST" , chk_url , reader )
@@ -1972,7 +1972,7 @@ func (m *Mega) processDeleteNode(evRaw []byte) error {
19721972func (m * Mega ) pollEvents () {
19731973 var err error
19741974 var resp * http.Response
1975- sleepTime := minSleepTime // inital backoff time
1975+ sleepTime := minSleepTime // initial backoff time
19761976 for {
19771977 if err != nil {
19781978 m .debugf ("pollEvents: error from server" , err )
0 commit comments