From 25e459659a77e7858b068949a497e28243247514 Mon Sep 17 00:00:00 2001 From: opennota Date: Thu, 9 Feb 2017 06:43:10 +0700 Subject: [PATCH] Fix some typos --- doc/Manual.md | 6 +++--- src/cmds/restic/cmd_forget.go | 2 +- src/cmds/restic/integration_test.go | 4 ++-- src/restic/archiver/archiver_test.go | 2 +- src/restic/backend/sftp/sftp.go | 4 ++-- src/restic/fs/doc.go | 2 +- src/restic/id.go | 2 +- src/restic/list/list.go | 2 +- src/restic/lock.go | 2 +- src/restic/repository/index.go | 2 +- src/restic/snapshot.go | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/Manual.md b/doc/Manual.md index a98f2d223..65b304b11 100644 --- a/doc/Manual.md +++ b/doc/Manual.md @@ -28,7 +28,7 @@ $ pacaur -S restic-git # Building restic restic is written in the Go programming language and you need at least Go version 1.6. -Building restic may also work with older versions of Go, but that's not spported. +Building restic may also work with older versions of Go, but that's not supported. See the [Getting started](https://golang.org/doc/install) guide of the Go project for instructions how to install Go. @@ -228,7 +228,7 @@ $ restic -r /tmp/backup backup ~/work --exclude=*.c --exclude-file=exclude Patterns use [`filepath.Glob`](https://golang.org/pkg/path/filepath/#Glob) internally, see [`filepath.Match`](https://golang.org/pkg/path/filepath/#Match) for syntax. -Additionally `**` exludes arbitrary subdirectories. +Additionally `**` excludes arbitrary subdirectories. Environment-variables in exclude-files are expanded with [`os.ExpandEnv`](https://golang.org/pkg/os/#ExpandEnv). By specifying the option `--one-file-system` you can instruct restic to only @@ -511,7 +511,7 @@ only available via HTTP, you can specify the URL to the server like this: ### Pre-Requisites * Download and Install [Minio Server](https://minio.io/download/). -* You can also refer to [https://docs.minio.io](https://docs.minio.io) for step by step guidance on installation and getting started on Minio CLient and Minio Server. +* You can also refer to [https://docs.minio.io](https://docs.minio.io) for step by step guidance on installation and getting started on Minio Client and Minio Server. You must first setup the following environment variables with the credentials of your running Minio Server. diff --git a/src/cmds/restic/cmd_forget.go b/src/cmds/restic/cmd_forget.go index df84f2a51..a28ae6f62 100644 --- a/src/cmds/restic/cmd_forget.go +++ b/src/cmds/restic/cmd_forget.go @@ -128,7 +128,7 @@ func runForget(opts ForgetOptions, gopts GlobalOptions, args []string) error { for _, s := range ids { id, err := restic.FindSnapshot(repo, s) if err != nil { - Warnf("cound not find a snapshot for ID %q, ignoring\n", s) + Warnf("could not find a snapshot for ID %q, ignoring\n", s) continue } diff --git a/src/cmds/restic/integration_test.go b/src/cmds/restic/integration_test.go index 426367724..c5dbd0e58 100644 --- a/src/cmds/restic/integration_test.go +++ b/src/cmds/restic/integration_test.go @@ -836,7 +836,7 @@ func TestRestoreWithPermissionFailure(t *testing.T) { testRunRestore(t, gopts, filepath.Join(env.base, "restore"), snapshots[0]) - // make sure that all files have been restored, regardeless of any + // make sure that all files have been restored, regardless of any // permission errors files := testRunLs(t, gopts, snapshots[0].String()) for _, filename := range files { @@ -935,7 +935,7 @@ func TestRebuildIndex(t *testing.T) { } if !strings.Contains(out, "restic rebuild-index") { - t.Fatalf("did not find hint for rebuild-index comman") + t.Fatalf("did not find hint for rebuild-index command") } testRunRebuildIndex(t, gopts) diff --git a/src/restic/archiver/archiver_test.go b/src/restic/archiver/archiver_test.go index 5c47b193d..4bbfef852 100644 --- a/src/restic/archiver/archiver_test.go +++ b/src/restic/archiver/archiver_test.go @@ -220,7 +220,7 @@ func testParallelSaveWithDuplication(t *testing.T, seed int) { errChannels := [](<-chan error){} - // interweaved processing of subsequent chunks + // interwoven processing of subsequent chunks maxParallel := 2*duplication - 1 barrier := make(chan struct{}, maxParallel) diff --git a/src/restic/backend/sftp/sftp.go b/src/restic/backend/sftp/sftp.go index 65e6f7f73..8894cdc85 100644 --- a/src/restic/backend/sftp/sftp.go +++ b/src/restic/backend/sftp/sftp.go @@ -153,7 +153,7 @@ func buildSSHCommand(cfg Config) []string { } // OpenWithConfig opens an sftp backend as described by the config by running -// "ssh" with the appropiate arguments. +// "ssh" with the appropriate arguments. func OpenWithConfig(cfg Config) (*SFTP, error) { debug.Log("open with config %v", cfg) return Open(cfg.Dir, "ssh", buildSSHCommand(cfg)...) @@ -193,7 +193,7 @@ func Create(dir string, program string, args ...string) (*SFTP, error) { } // CreateWithConfig creates an sftp backend as described by the config by running -// "ssh" with the appropiate arguments. +// "ssh" with the appropriate arguments. func CreateWithConfig(cfg Config) (*SFTP, error) { debug.Log("config %v", cfg) return Create(cfg.Dir, "ssh", buildSSHCommand(cfg)...) diff --git a/src/restic/fs/doc.go b/src/restic/fs/doc.go index 29bfa6661..06072381e 100644 --- a/src/restic/fs/doc.go +++ b/src/restic/fs/doc.go @@ -1,3 +1,3 @@ -// Package fs implements an OS independend abstraction of a file system +// Package fs implements an OS independent abstraction of a file system // suitable for backup purposes. package fs diff --git a/src/restic/id.go b/src/restic/id.go index c64508a4e..25bf9514b 100644 --- a/src/restic/id.go +++ b/src/restic/id.go @@ -43,7 +43,7 @@ func (id ID) String() string { return hex.EncodeToString(id[:]) } -// NewRandomID retuns a randomly generated ID. When reading from rand fails, +// NewRandomID returns a randomly generated ID. When reading from rand fails, // the function panics. func NewRandomID() ID { id := ID{} diff --git a/src/restic/list/list.go b/src/restic/list/list.go index 18bfb606f..70b3c7d9c 100644 --- a/src/restic/list/list.go +++ b/src/restic/list/list.go @@ -25,7 +25,7 @@ func (l Result) PackID() restic.ID { return l.packID } -// Size ruturns the size of the pack. +// Size returns the size of the pack. func (l Result) Size() int64 { return l.size } diff --git a/src/restic/lock.go b/src/restic/lock.go index 8fec7535b..97f2d652e 100644 --- a/src/restic/lock.go +++ b/src/restic/lock.go @@ -203,7 +203,7 @@ func (l *Lock) Stale() bool { hn, err := os.Hostname() if err != nil { - debug.Log("unable to find current hostnanme: %v", err) + debug.Log("unable to find current hostname: %v", err) // since we cannot find the current hostname, assume that the lock is // not stale. return false diff --git a/src/restic/repository/index.go b/src/restic/repository/index.go index 4257c7dfa..0db683215 100644 --- a/src/restic/repository/index.go +++ b/src/restic/repository/index.go @@ -392,7 +392,7 @@ func (idx *Index) SetID(id restic.ID) error { defer idx.m.Unlock() if !idx.final { - return errors.New("indexs is not final") + return errors.New("index is not final") } if !idx.id.IsNull() { diff --git a/src/restic/snapshot.go b/src/restic/snapshot.go index 2320fd988..f2451a280 100644 --- a/src/restic/snapshot.go +++ b/src/restic/snapshot.go @@ -87,7 +87,7 @@ func (sn Snapshot) String() string { sn.id.Str(), sn.Paths, sn.Time, sn.Username, sn.Hostname) } -// ID retuns the snapshot's ID. +// ID returns the snapshot's ID. func (sn Snapshot) ID() *ID { return sn.id }