mirror of
https://github.com/rclone/rclone.git
synced 2025-12-15 15:53:41 +00:00
Error strings should not be capitalized
Reported by staticcheck 2022.1.2 (v0.3.2) See: staticcheck.io
This commit is contained in:
@@ -400,7 +400,7 @@ func (f *File) _applyPendingModTime() error {
|
||||
defer func() { f.pendingModTime = time.Time{} }()
|
||||
|
||||
if f.o == nil {
|
||||
return errors.New("Cannot apply ModTime, file object is not available")
|
||||
return errors.New("cannot apply ModTime, file object is not available")
|
||||
}
|
||||
|
||||
dt := f.pendingModTime.Sub(f.o.ModTime(context.Background()))
|
||||
|
||||
@@ -40,7 +40,7 @@ func (l *CacheMode) Set(s string) error {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return fmt.Errorf("Unknown cache mode level %q", s)
|
||||
return fmt.Errorf("unknown cache mode level %q", s)
|
||||
}
|
||||
|
||||
// Type of the value
|
||||
@@ -52,7 +52,7 @@ func (l *CacheMode) Type() string {
|
||||
func (l *CacheMode) UnmarshalJSON(in []byte) error {
|
||||
return fs.UnmarshalJSONFlag(in, l, func(i int64) error {
|
||||
if i < 0 || i >= int64(len(cacheModeToString)) {
|
||||
return fmt.Errorf("Unknown cache mode level %d", i)
|
||||
return fmt.Errorf("unknown cache mode level %d", i)
|
||||
}
|
||||
*l = CacheMode(i)
|
||||
return nil
|
||||
|
||||
@@ -20,7 +20,7 @@ func (x *FileMode) String() string {
|
||||
func (x *FileMode) Set(s string) error {
|
||||
i, err := strconv.ParseInt(s, 8, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Bad FileMode - must be octal digits: %w", err)
|
||||
return fmt.Errorf("bad FileMode - must be octal digits: %w", err)
|
||||
}
|
||||
*x.Mode = (os.FileMode)(i)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user