Add unconvert linter
This linter checks for unnecessary type convertions. Some convertions are whitelisted because their type is different on 32bit platforms Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
@@ -12,8 +12,7 @@ import (
|
||||
|
||||
func getATime(fi os.FileInfo) time.Time {
|
||||
if st, ok := fi.Sys().(*syscall.Stat_t); ok {
|
||||
return time.Unix(int64(sys.StatAtime(st).Sec),
|
||||
int64(sys.StatAtime(st).Nsec))
|
||||
return sys.StatATimeAsTime(st)
|
||||
}
|
||||
|
||||
return fi.ModTime()
|
||||
|
Reference in New Issue
Block a user