fix spelling

This commit is contained in:
Fabian Möller 2019-04-30 14:06:24 +02:00
parent 7963320a29
commit 48c09608ea
No known key found for this signature in database
GPG Key ID: 70B29D65DD8A7E31
31 changed files with 41 additions and 41 deletions

View File

@ -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 {

View File

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

View File

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

View File

@ -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.

View File

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

View File

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

View File

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

View File

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

View File

@ -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 {

View File

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

View File

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

View File

@ -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"),

View File

@ -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 {

View File

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

View File

@ -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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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{

View File

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

View File

@ -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 {

View File

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