From 741644b575655560aa542f2a79c9457f6243387e Mon Sep 17 00:00:00 2001 From: Michael Cook Date: Wed, 20 Jun 2018 21:18:51 -0700 Subject: [PATCH] spelling --- src/duplicacy_backupmanager.go | 8 ++++---- src/duplicacy_chunk.go | 2 +- src/duplicacy_chunk_test.go | 2 +- src/duplicacy_chunkoperator.go | 2 +- src/duplicacy_filereader.go | 2 +- src/duplicacy_snapshotmanager.go | 6 +++--- src/duplicacy_storage.go | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/duplicacy_backupmanager.go b/src/duplicacy_backupmanager.go index f7f836c..f6d4c81 100644 --- a/src/duplicacy_backupmanager.go +++ b/src/duplicacy_backupmanager.go @@ -981,12 +981,12 @@ type fileEncoder struct { buffer *bytes.Buffer } -// Read reads data from the embeded buffer +// Read reads data from the embedded buffer func (encoder fileEncoder) Read(data []byte) (n int, err error) { return encoder.buffer.Read(data) } -// NextFile switchs to the next file and generates its json description in the buffer. It also takes care of +// NextFile switches to the next file and generates its json description in the buffer. It also takes care of // the ending ']' and the commas between files. func (encoder *fileEncoder) NextFile() (io.Reader, bool) { if encoder.currentIndex == len(encoder.files) { @@ -1126,7 +1126,7 @@ func (manager *BackupManager) UploadSnapshot(chunkMaker *ChunkMaker, uploader *C } // Restore downloads a file from the storage. If 'inPlace' is false, the download file is saved first to a temporary -// file under the .duplicacy directory and then replaces the existing one. Otherwise, the exising file will be +// file under the .duplicacy directory and then replaces the existing one. Otherwise, the existing file will be // overwritten directly. func (manager *BackupManager) RestoreFile(chunkDownloader *ChunkDownloader, chunkMaker *ChunkMaker, entry *Entry, top string, inPlace bool, overwrite bool, showStatistics bool, totalFileSize int64, downloadedFileSize int64, startTime int64) bool { @@ -1528,7 +1528,7 @@ func (manager *BackupManager) CopySnapshots(otherManager *BackupManager, snapsho revisionsToBeCopied []int, threads int) bool { if !manager.config.IsCompatiableWith(otherManager.config) { - LOG_ERROR("CONFIG_INCOMPATIABLE", "Two storages are not compatiable for the copy operation") + LOG_ERROR("CONFIG_INCOMPATIBLE", "Two storages are not compatible for the copy operation") return false } diff --git a/src/duplicacy_chunk.go b/src/duplicacy_chunk.go index 2a24493..1865501 100644 --- a/src/duplicacy_chunk.go +++ b/src/duplicacy_chunk.go @@ -267,7 +267,7 @@ func (chunk *Chunk) Encrypt(encryptionKey []byte, derivationKey string) (err err } -// This is to ensure compability with Vertical Backup, which still uses HMAC-SHA256 (instead of HMAC-BLAKE2) to +// This is to ensure compatibility with Vertical Backup, which still uses HMAC-SHA256 (instead of HMAC-BLAKE2) to // derive the key used to encrypt/decrypt files and chunks. var DecryptWithHMACSHA256 = false diff --git a/src/duplicacy_chunk_test.go b/src/duplicacy_chunk_test.go index b4bf83a..a88964c 100644 --- a/src/duplicacy_chunk_test.go +++ b/src/duplicacy_chunk_test.go @@ -71,7 +71,7 @@ func TestChunk(t *testing.T) { } if bytes.Compare(plainData, decryptedData) != 0 { - t.Logf("orginal length: %d, decrypted length: %d", len(plainData), len(decryptedData)) + t.Logf("Original length: %d, decrypted length: %d", len(plainData), len(decryptedData)) t.Errorf("Original data:\n%x\nDecrypted data:\n%x\n", plainData, decryptedData) } diff --git a/src/duplicacy_chunkoperator.go b/src/duplicacy_chunkoperator.go index 1585e8e..f42742a 100644 --- a/src/duplicacy_chunkoperator.go +++ b/src/duplicacy_chunkoperator.go @@ -18,7 +18,7 @@ const ( ChunkOperationResurrect = 3 ) -// ChunkOperatorTask is used to pass paramaters for different kinds of chunk operations. +// ChunkOperatorTask is used to pass parameters for different kinds of chunk operations. type ChunkOperatorTask struct { operation int // The type of operation chunkID string // The chunk id diff --git a/src/duplicacy_filereader.go b/src/duplicacy_filereader.go index 4b8fa45..5d229e6 100644 --- a/src/duplicacy_filereader.go +++ b/src/duplicacy_filereader.go @@ -34,7 +34,7 @@ func CreateFileReader(top string, files []*Entry) *FileReader { return reader } -// NextFile switchs to the next file in the file reader. +// NextFile switches to the next file in the file reader. func (reader *FileReader) NextFile() bool { if reader.CurrentFile != nil { diff --git a/src/duplicacy_snapshotmanager.go b/src/duplicacy_snapshotmanager.go index 46c9358..f05d062 100644 --- a/src/duplicacy_snapshotmanager.go +++ b/src/duplicacy_snapshotmanager.go @@ -386,7 +386,7 @@ func (manager *SnapshotManager) CleanSnapshotCache(latestSnapshot *Snapshot, all if allSnapshots == nil { // If the 'fossils' directory exists then don't clean the cache as all snapshots will be needed later - // during the fossil collection phase. The deletion procedure creates this direcotry. + // during the fossil collection phase. The deletion procedure creates this directory. // We only check this condition when allSnapshots is nil because // in thise case it is the deletion procedure that is trying to clean the snapshot cache. exist, _, _, err := manager.snapshotCache.GetFileInfo(0, "fossils") @@ -1154,7 +1154,7 @@ func (manager *SnapshotManager) VerifySnapshot(snapshot *Snapshot) bool { } } -// RetrieveFile retrieve the file in the specifed snapshot. +// RetrieveFile retrieves the file in the specified snapshot. func (manager *SnapshotManager) RetrieveFile(snapshot *Snapshot, file *Entry, output func([]byte)) bool { if file.Size == 0 { @@ -2247,7 +2247,7 @@ func (manager *SnapshotManager) pruneSnapshotsExhaustive(referencedFossils map[s chunk := strings.Replace(file, "/", "", -1) if !chunkRegex.MatchString(chunk) { - LOG_WARN("CHUNK_UNKONWN_FILE", "File %s is not a chunk", file) + LOG_WARN("CHUNK_UNKNOWN_FILE", "File %s is not a chunk", file) continue } diff --git a/src/duplicacy_storage.go b/src/duplicacy_storage.go index 040acea..ed5b4df 100644 --- a/src/duplicacy_storage.go +++ b/src/duplicacy_storage.go @@ -89,7 +89,7 @@ func (storage *StorageBase) SetRateLimits(downloadRateLimit int, uploadRateLimit } // SetDefaultNestingLevels sets the default read and write levels. This is usually called by -// derived storages to set the levels with old values so that storages initialied by ealier versions +// derived storages to set the levels with old values so that storages initialized by earlier versions // will continue to work. func (storage *StorageBase) SetDefaultNestingLevels(readLevels []int, writeLevel int) { storage.readLevels = readLevels