Add support for label storage in local content store

Allows running tests which require labels on the content store

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-10-18 14:59:21 -07:00
parent f2ae8a020a
commit 7b08bcdb65
8 changed files with 178 additions and 16 deletions

View File

@@ -18,3 +18,12 @@ func getStartTime(fi os.FileInfo) time.Time {
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),
int64(sys.StatAtime(st).Nsec))
}
return fi.ModTime()
}