refactor: removed unused code, unnecessary typecasts and fixed small warnings

This commit is contained in:
Deluan
2020-03-20 00:02:31 -04:00
parent 270b0ae74e
commit f6e448c1ba
10 changed files with 8 additions and 162 deletions
+1 -1
View File
@@ -46,10 +46,10 @@ func (s *ChangeDetector) Scan(lastModifiedSince time.Time) (changed []string, de
func (s *ChangeDetector) loadDir(dirPath string) (children []string, lastUpdated time.Time, err error) {
dir, err := os.Open(dirPath)
defer dir.Close()
if err != nil {
return
}
defer dir.Close()
dirInfo, err := os.Stat(dirPath)
if err != nil {
return