Move archive package into pkg/archive
Now that the archive package does not depend on any docker-specific packages, only those in pkg and vendor, it can be safely moved into pkg. Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
This commit is contained in:
parent
fdc594e811
commit
bd898dfb55
11 changed files with 1912 additions and 0 deletions
16
archive/time_linux.go
Normal file
16
archive/time_linux.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package archive
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
func timeToTimespec(time time.Time) (ts syscall.Timespec) {
|
||||
if time.IsZero() {
|
||||
// Return UTIME_OMIT special value
|
||||
ts.Sec = 0
|
||||
ts.Nsec = ((1 << 30) - 2)
|
||||
return
|
||||
}
|
||||
return syscall.NsecToTimespec(time.UnixNano())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue