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_unsupported.go
Normal file
16
archive/time_unsupported.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
// +build !linux
|
||||
|
||||
package archive
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
func timeToTimespec(time time.Time) (ts syscall.Timespec) {
|
||||
nsec := int64(0)
|
||||
if !time.IsZero() {
|
||||
nsec = time.UnixNano()
|
||||
}
|
||||
return syscall.NsecToTimespec(nsec)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue