From 48c09608ea96703def8654844a07afee5839579d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=B6ller?= Date: Tue, 30 Apr 2019 14:06:24 +0200 Subject: [PATCH] fix spelling --- cmd/cmount/mount.go | 2 +- cmd/ls/lshelp/lshelp.go | 2 +- cmd/mount/dir.go | 2 +- cmd/mount/fs.go | 4 ++-- cmd/moveto/moveto.go | 2 +- cmd/ncdu/ncdu.go | 2 +- cmd/progress.go | 2 +- cmd/serve/ftp/ftp.go | 8 ++++---- cmd/serve/httplib/serve/data/data.go | 2 +- cmd/settier/settier.go | 2 +- fs/accounting/accounting.go | 2 +- fs/accounting/stats.go | 2 +- fs/chunkedreader/chunkedreader.go | 4 ++-- fs/config.go | 2 +- fs/config/config.go | 6 +++--- fs/config/configflags/configflags.go | 2 +- fs/config/configstruct/configstruct.go | 2 +- fs/config/flags/flags.go | 2 +- fs/filter/filter.go | 2 +- fs/fs.go | 4 ++-- fs/fshttp/http_test.go | 2 +- fs/list/list.go | 2 +- fs/operations/operations.go | 4 ++-- fs/options.go | 2 +- fs/rc/internal.go | 2 +- fs/sizesuffix.go | 2 +- fs/sync/sync.go | 2 +- fs/walk/walk_test.go | 2 +- fstest/fstests/fstests.go | 4 ++-- lib/oauthutil/oauthutil.go | 2 +- lib/rest/rest_header_reset.go | 2 +- 31 files changed, 41 insertions(+), 41 deletions(-) diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go index 3bb26ebe2..45b51f27f 100644 --- a/cmd/cmount/mount.go +++ b/cmd/cmount/mount.go @@ -127,7 +127,7 @@ func waitFor(fn func() bool) (ok bool) { func mount(f fs.Fs, mountpoint string) (*vfs.VFS, <-chan error, func() error, error) { fs.Debugf(f, "Mounting on %q", mountpoint) - // Check the mountpoint - in Windows the mountpoint musn't exist before the mount + // Check the mountpoint - in Windows the mountpoint mustn't exist before the mount if runtime.GOOS != "windows" { fi, err := os.Stat(mountpoint) if err != nil { diff --git a/cmd/ls/lshelp/lshelp.go b/cmd/ls/lshelp/lshelp.go index 2343f4c5c..b9bec0841 100644 --- a/cmd/ls/lshelp/lshelp.go +++ b/cmd/ls/lshelp/lshelp.go @@ -2,7 +2,7 @@ package lshelp // Help describes the common help for all the list commands var Help = ` -Any of the filtering options can be applied to this commmand. +Any of the filtering options can be applied to this command. There are several related list commands diff --git a/cmd/mount/dir.go b/cmd/mount/dir.go index ee86bc890..e95281119 100644 --- a/cmd/mount/dir.go +++ b/cmd/mount/dir.go @@ -20,7 +20,7 @@ type Dir struct { *vfs.Dir } -// Check interface satsified +// Check interface satisfied var _ fusefs.Node = (*Dir)(nil) // Attr updates the attributes of a directory diff --git a/cmd/mount/fs.go b/cmd/mount/fs.go index 68e7cc5b0..64a8d9d48 100644 --- a/cmd/mount/fs.go +++ b/cmd/mount/fs.go @@ -24,7 +24,7 @@ type FS struct { f fs.Fs } -// Check interface satistfied +// Check interface satisfied var _ fusefs.FS = (*FS)(nil) // NewFS makes a new FS @@ -46,7 +46,7 @@ func (f *FS) Root() (node fusefs.Node, err error) { return &Dir{root}, nil } -// Check interface satsified +// Check interface satisfied var _ fusefs.FSStatfser = (*FS)(nil) // Statfs is called to obtain file system metadata. diff --git a/cmd/moveto/moveto.go b/cmd/moveto/moveto.go index 8a45bd0c5..e17dac126 100644 --- a/cmd/moveto/moveto.go +++ b/cmd/moveto/moveto.go @@ -19,7 +19,7 @@ If source:path is a file or directory then it moves it to a file or directory named dest:path. This can be used to rename files or upload single files to other than -their existing name. If the source is a directory then it acts exacty +their existing name. If the source is a directory then it acts exactly like the move command. So diff --git a/cmd/ncdu/ncdu.go b/cmd/ncdu/ncdu.go index 6dd13cc50..6468b787c 100644 --- a/cmd/ncdu/ncdu.go +++ b/cmd/ncdu/ncdu.go @@ -361,7 +361,7 @@ func (u *UI) Draw() error { Linef(0, h-1, w, termbox.ColorBlack, termbox.ColorWhite, ' ', "Total usage: %v, Objects: %d%s", fs.SizeSuffix(size), count, message) } - // Show the box on top if requred + // Show the box on top if required if u.showBox { u.Box() } diff --git a/cmd/progress.go b/cmd/progress.go index f6550a5bc..e4d2f1de3 100644 --- a/cmd/progress.go +++ b/cmd/progress.go @@ -82,7 +82,7 @@ var ( progressMu sync.Mutex ) -// printProgress prings the progress with an optional log +// printProgress prints the progress with an optional log func printProgress(logMessage string) { progressMu.Lock() defer progressMu.Unlock() diff --git a/cmd/serve/ftp/ftp.go b/cmd/serve/ftp/ftp.go index 1789b066e..ea870c890 100644 --- a/cmd/serve/ftp/ftp.go +++ b/cmd/serve/ftp/ftp.go @@ -155,7 +155,7 @@ func (f *DriverFactory) NewDriver() (ftp.Driver, error) { }, nil } -//Driver impletation of ftp server +//Driver implementation of ftp server type Driver struct { vfs *vfs.VFS lock sync.Mutex @@ -378,7 +378,7 @@ func (d *Driver) PutFile(path string, data io.Reader, appendData bool) (n int64, return bytes, nil } -//FileInfo struct ot hold file infor for ftp server +//FileInfo struct to hold file info for ftp server type FileInfo struct { os.FileInfo @@ -387,7 +387,7 @@ type FileInfo struct { group uint32 } -//Mode return êrm mode of file. +//Mode return mode of file. func (f *FileInfo) Mode() os.FileMode { return f.mode } @@ -407,7 +407,7 @@ func (f *FileInfo) Group() string { str := fmt.Sprint(f.group) g, err := user.LookupGroupId(str) if err != nil { - return str //Group not found default to numrical value + return str //Group not found default to numerical value } return g.Name } diff --git a/cmd/serve/httplib/serve/data/data.go b/cmd/serve/httplib/serve/data/data.go index d0c51ebaa..a470ee0f6 100644 --- a/cmd/serve/httplib/serve/data/data.go +++ b/cmd/serve/httplib/serve/data/data.go @@ -11,7 +11,7 @@ import ( "github.com/pkg/errors" ) -// GetTemplate eturns the HTML template for serving directories via HTTP +// GetTemplate returns the HTML template for serving directories via HTTP func GetTemplate() (tpl *template.Template, err error) { templateFile, err := Assets.Open("index.html") if err != nil { diff --git a/cmd/settier/settier.go b/cmd/settier/settier.go index 2faa7b643..3bf8c9a0e 100644 --- a/cmd/settier/settier.go +++ b/cmd/settier/settier.go @@ -20,7 +20,7 @@ Few cloud storage services provides different storage classes on objects, for example AWS S3 and Glacier, Azure Blob storage - Hot, Cool and Archive, Google Cloud Storage, Regional Storage, Nearline, Coldline etc. -Note that, certain tier chages make objects not available to access immediately. +Note that, certain tier changes make objects not available to access immediately. For example tiering to archive in azure blob storage makes objects in frozen state, user can restore by setting tier to Hot/Cool, similarly S3 to Glacier makes object inaccessible.true diff --git a/fs/accounting/accounting.go b/fs/accounting/accounting.go index adad7f280..1e1e1f29c 100644 --- a/fs/accounting/accounting.go +++ b/fs/accounting/accounting.go @@ -116,7 +116,7 @@ func (acc *Account) StopBuffering() { } // UpdateReader updates the underlying io.ReadCloser stopping the -// asynb buffer (if any) and re-adding it +// async buffer (if any) and re-adding it func (acc *Account) UpdateReader(in io.ReadCloser) { acc.mu.Lock() acc.StopBuffering() diff --git a/fs/accounting/stats.go b/fs/accounting/stats.go index 752cb8b00..43c4d86bc 100644 --- a/fs/accounting/stats.go +++ b/fs/accounting/stats.go @@ -90,7 +90,7 @@ type StatsInfo struct { inProgress *inProgress } -// NewStats cretates an initialised StatsInfo +// NewStats creates an initialised StatsInfo func NewStats() *StatsInfo { return &StatsInfo{ checking: newStringSet(fs.Config.Checkers, "checking"), diff --git a/fs/chunkedreader/chunkedreader.go b/fs/chunkedreader/chunkedreader.go index 4a4a62cf3..5dcc9fd90 100644 --- a/fs/chunkedreader/chunkedreader.go +++ b/fs/chunkedreader/chunkedreader.go @@ -183,8 +183,8 @@ func (cr *ChunkedReader) Open() (*ChunkedReader, error) { // openRange will open the source Object with the current chunk range // -// If the current open reader implenets RangeSeeker, it is tried first. -// When RangeSeek failes, o.Open with a RangeOption is used. +// If the current open reader implements RangeSeeker, it is tried first. +// When RangeSeek fails, o.Open with a RangeOption is used. // // A length <= 0 will request till the end of the file func (cr *ChunkedReader) openRange() error { diff --git a/fs/config.go b/fs/config.go index 543ba3fa3..7d3f968d3 100644 --- a/fs/config.go +++ b/fs/config.go @@ -94,7 +94,7 @@ type ConfigInfo struct { } // NewConfig creates a new config with everything set to the default -// value. These are the ultimate defaults and are overriden by the +// value. These are the ultimate defaults and are overridden by the // config module. func NewConfig() *ConfigInfo { c := new(ConfigInfo) diff --git a/fs/config/config.go b/fs/config/config.go index 7076937d6..00ad77e99 100644 --- a/fs/config/config.go +++ b/fs/config/config.go @@ -676,11 +676,11 @@ func ConfirmWithConfig(m configmap.Getter, configName string, Default bool) bool // Choose one of the defaults or type a new string if newOk is set func Choose(what string, defaults, help []string, newOk bool) string { - valueDescripton := "an existing" + valueDescription := "an existing" if newOk { - valueDescripton = "your own" + valueDescription = "your own" } - fmt.Printf("Choose a number from below, or type in %s value\n", valueDescripton) + fmt.Printf("Choose a number from below, or type in %s value\n", valueDescription) for i, text := range defaults { var lines []string if help != nil { diff --git a/fs/config/configflags/configflags.go b/fs/config/configflags/configflags.go index 81541feb5..c3acc87cb 100644 --- a/fs/config/configflags/configflags.go +++ b/fs/config/configflags/configflags.go @@ -95,7 +95,7 @@ func AddFlags(flagSet *pflag.FlagSet) { flags.StringVarP(flagSet, &fs.Config.ClientKey, "client-key", "", fs.Config.ClientKey, "Client SSL private key (PEM) for mutual TLS auth") } -// SetFlags converts any flags into config which weren't straight foward +// SetFlags converts any flags into config which weren't straight forward func SetFlags() { if verbose >= 2 { fs.Config.LogLevel = fs.LogLevelDebug diff --git a/fs/config/configstruct/configstruct.go b/fs/config/configstruct/configstruct.go index e2f57c4c0..431996e5a 100644 --- a/fs/config/configstruct/configstruct.go +++ b/fs/config/configstruct/configstruct.go @@ -43,7 +43,7 @@ func StringToInterface(def interface{}, in string) (newValue interface{}, err er return o.Elem().Interface(), nil } -// Item descripts a single entry in the options structure +// Item describes a single entry in the options structure type Item struct { Name string // snake_case Field string // CamelCase diff --git a/fs/config/flags/flags.go b/fs/config/flags/flags.go index 4297f3c06..42f97af4c 100644 --- a/fs/config/flags/flags.go +++ b/fs/config/flags/flags.go @@ -1,4 +1,4 @@ -// Package flags contains enahnced versions of spf13/pflag flag +// Package flags contains enhanced versions of spf13/pflag flag // routines which will read from the environment also. package flags diff --git a/fs/filter/filter.go b/fs/filter/filter.go index 16ee3d128..a5d58cf0c 100644 --- a/fs/filter/filter.go +++ b/fs/filter/filter.go @@ -95,7 +95,7 @@ func (rs *rules) boundedRecursion() bool { // FilesMap describes the map of files to transfer type FilesMap map[string]struct{} -// Opt configues the filter +// Opt configures the filter type Opt struct { DeleteExcluded bool FilterRule []string diff --git a/fs/fs.go b/fs/fs.go index feb081208..dc31fdce9 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -792,8 +792,8 @@ type ChangeNotifier interface { // At least one value will be written to the channel, // specifying the initial value and updated values might // follow. A 0 Duration should pause the polling. - // The ChangeNotify implemantion must empty the channel - // regulary. When the channel gets closed, the implemantion + // The ChangeNotify implementation must empty the channel + // regularly. When the channel gets closed, the implementation // should stop polling and release resources. ChangeNotify(func(string, EntryType), <-chan time.Duration) } diff --git a/fs/fshttp/http_test.go b/fs/fshttp/http_test.go index 016d84fa6..b16747dcd 100644 --- a/fs/fshttp/http_test.go +++ b/fs/fshttp/http_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" ) -// returns the "%p" reprentation of the thing passed in +// returns the "%p" representation of the thing passed in func ptr(p interface{}) string { return fmt.Sprintf("%p", p) } diff --git a/fs/list/list.go b/fs/list/list.go index 37b001eee..88b6773e0 100644 --- a/fs/list/list.go +++ b/fs/list/list.go @@ -67,7 +67,7 @@ func filterAndSortDir(entries fs.DirEntries, includeAll bool, dir string, default: return nil, errors.Errorf("unknown object type %T", entry) } - // check remote name belongs in this directry + // check remote name belongs in this directory remote := entry.Remote() switch { case !ok: diff --git a/fs/operations/operations.go b/fs/operations/operations.go index a04b356c4..6eba7f401 100644 --- a/fs/operations/operations.go +++ b/fs/operations/operations.go @@ -206,7 +206,7 @@ func equal(src fs.ObjectInfo, dst fs.Object, sizeOnly, checkSum bool) bool { // Used to remove a failed copy // -// Returns whether the file was succesfully removed or not +// Returns whether the file was successfully removed or not func removeFailedCopy(dst fs.Object) bool { if dst == nil { return false @@ -226,7 +226,7 @@ type overrideRemoteObject struct { remote string } -// Remote returns the overriden remote name +// Remote returns the overridden remote name func (o *overrideRemoteObject) Remote() string { return o.remote } diff --git a/fs/options.go b/fs/options.go index c277b1142..4d2b0ef9b 100644 --- a/fs/options.go +++ b/fs/options.go @@ -68,7 +68,7 @@ func (o *RangeOption) Header() (key string, value string) { } // ParseRangeOption parses a RangeOption from a Range: header. -// It only appects single ranges. +// It only accepts single ranges. func ParseRangeOption(s string) (po *RangeOption, err error) { const preamble = "bytes=" if !strings.HasPrefix(s, preamble) { diff --git a/fs/rc/internal.go b/fs/rc/internal.go index 6d8a296fd..a161f2ab3 100644 --- a/fs/rc/internal.go +++ b/fs/rc/internal.go @@ -34,7 +34,7 @@ check that parameter passing is working properly.`, }) } -// Echo the input to the ouput parameters +// Echo the input to the output parameters func rcNoop(in Params) (out Params, err error) { return in, nil } diff --git a/fs/sizesuffix.go b/fs/sizesuffix.go index 67b1d2c43..c1d1b79c9 100644 --- a/fs/sizesuffix.go +++ b/fs/sizesuffix.go @@ -132,7 +132,7 @@ func (x *SizeSuffix) Scan(s fmt.ScanState, ch rune) error { return x.Set(string(token)) } -// SizeSuffixList is a sclice SizeSuffix values +// SizeSuffixList is a slice SizeSuffix values type SizeSuffixList []SizeSuffix func (l SizeSuffixList) Len() int { return len(l) } diff --git a/fs/sync/sync.go b/fs/sync/sync.go index ae6f8c4d0..cd8fc910e 100644 --- a/fs/sync/sync.go +++ b/fs/sync/sync.go @@ -188,7 +188,7 @@ func (s *syncCopyMove) processError(err error) { } } -// Returns the current error (if any) in the order of prececedence +// Returns the current error (if any) in the order of precedence // fatalErr // normal error // noRetryErr diff --git a/fs/walk/walk_test.go b/fs/walk/walk_test.go index 33f7f6ba2..4e29b9961 100644 --- a/fs/walk/walk_test.go +++ b/fs/walk/walk_test.go @@ -219,7 +219,7 @@ func TestWalkNotFoundMaskError(t *testing.T) { ).Walk() } -func TestWalkNotFoundSkipkError(t *testing.T) { +func TestWalkNotFoundSkipError(t *testing.T) { // this doesn't work for WalkR newListDirs(t, nil, true, listResults{ diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go index 0923d29ac..82c1f7f77 100644 --- a/fstest/fstests/fstests.go +++ b/fstest/fstests/fstests.go @@ -211,7 +211,7 @@ func testPutLarge(t *testing.T, f fs.Fs, file *fstest.Item) { require.NoError(t, obj.Remove()) } -// errorReader just returne an error on Read +// errorReader just returns an error on Read type errorReader struct { err error } @@ -267,7 +267,7 @@ func stringsContains(x string, ss []string) bool { // Run runs the basic integration tests for a remote using the options passed in. // -// They are structured in a heirachical way so that dependencies for the tests can be created. +// They are structured in a hierarchical way so that dependencies for the tests can be created. // // For example some tests require the directory to be created - these // are inside the "FsMkdir" test. Some tests require some tests files diff --git a/lib/oauthutil/oauthutil.go b/lib/oauthutil/oauthutil.go index bfc58d8f7..0fdb60ed0 100644 --- a/lib/oauthutil/oauthutil.go +++ b/lib/oauthutil/oauthutil.go @@ -154,7 +154,7 @@ type TokenSource struct { } // If token has expired then first try re-reading it from the config -// file in case a concurrently runnng rclone has updated it already +// file in case a concurrently running rclone has updated it already func (ts *TokenSource) reReadToken() bool { tokenString, err := config.FileGetFresh(ts.name, config.ConfigToken) if err != nil { diff --git a/lib/rest/rest_header_reset.go b/lib/rest/rest_header_reset.go index 599473f40..9557c1d2a 100644 --- a/lib/rest/rest_header_reset.go +++ b/lib/rest/rest_header_reset.go @@ -9,7 +9,7 @@ import ( // ClientWithHeaderReset makes a new http client which resets the // headers passed in on redirect // -// This is now unecessary with go1.8 so becomes a no-op +// This is now unnecessary with go1.8 so becomes a no-op func ClientWithHeaderReset(c *http.Client, headers map[string]string) *http.Client { return c }