Add structcheck, unused, and varcheck linters.

Warn on unused and dead code

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin
2017-11-13 16:21:26 -05:00
parent 96e2f30250
commit f74862a0dd
35 changed files with 29 additions and 444 deletions

View File

@@ -10,15 +10,6 @@ import (
"github.com/containerd/containerd/sys"
)
func getStartTime(fi os.FileInfo) time.Time {
if st, ok := fi.Sys().(*syscall.Stat_t); ok {
return time.Unix(int64(sys.StatCtime(st).Sec),
int64(sys.StatCtime(st).Nsec))
}
return fi.ModTime()
}
func getATime(fi os.FileInfo) time.Time {
if st, ok := fi.Sys().(*syscall.Stat_t); ok {
return time.Unix(int64(sys.StatAtime(st).Sec),