718066ad61
pkg/archive contains code both invoked from cli (cross platform) and daemon (linux only) and Unix-specific dependencies break compilation on Windows. We extracted those stat-related funcs into platform specific implementations at pkg/system and added unit tests. Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
14 lines
203 B
Go
14 lines
203 B
Go
package system
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
func fromStatT(s *syscall.Stat_t) (*Stat, error) {
|
|
return &Stat{size: s.Size,
|
|
mode: s.Mode,
|
|
uid: s.Uid,
|
|
gid: s.Gid,
|
|
rdev: s.Rdev,
|
|
mtim: s.Mtim}, nil
|
|
}
|