error strings should not be capitalized (ST1005)
This commit is contained in:
6
parse.go
6
parse.go
@@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var errUnsupportedListLine = errors.New("Unsupported LIST line")
|
||||
var errUnsupportedListLine = errors.New("unsupported LIST line")
|
||||
|
||||
type parseFunc func(string, time.Time, *time.Location) (*Entry, error)
|
||||
|
||||
@@ -132,7 +132,7 @@ func parseLsListLine(line string, now time.Time, loc *time.Location) (*Entry, er
|
||||
case 'l':
|
||||
e.Type = EntryTypeLink
|
||||
default:
|
||||
return nil, errors.New("Unknown entry type")
|
||||
return nil, errors.New("unknown entry type")
|
||||
}
|
||||
|
||||
if err := e.setTime(fields[5:8], now, loc); err != nil {
|
||||
@@ -246,7 +246,7 @@ func (e *Entry) setTime(fields []string, now time.Time, loc *time.Location) (err
|
||||
|
||||
} else { // only the date
|
||||
if len(fields[2]) != 4 {
|
||||
return errors.New("Invalid year format in time string")
|
||||
return errors.New("invalid year format in time string")
|
||||
}
|
||||
timeStr := fmt.Sprintf("%s %s %s 00:00", fields[1], fields[0], fields[2])
|
||||
e.Time, err = time.ParseInLocation("_2 Jan 2006 15:04", timeStr, loc)
|
||||
|
||||
Reference in New Issue
Block a user