pkg/system: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ee2ac6c205
commit
fb017754e1
6 changed files with 20 additions and 13 deletions
|
@ -1,9 +1,7 @@
|
|||
package system // import "github.com/docker/docker/pkg/system"
|
||||
|
||||
var (
|
||||
// containerdRuntimeSupported determines if containerd should be the runtime.
|
||||
containerdRuntimeSupported = false
|
||||
)
|
||||
// containerdRuntimeSupported determines if containerd should be the runtime.
|
||||
var containerdRuntimeSupported = false
|
||||
|
||||
// InitContainerdRuntime sets whether to use containerd for runtime on Windows.
|
||||
func InitContainerdRuntime(cdPath string) {
|
||||
|
|
|
@ -6,10 +6,12 @@ import "syscall"
|
|||
|
||||
// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
|
||||
func fromStatT(s *syscall.Stat_t) (*StatT, error) {
|
||||
return &StatT{size: s.Size,
|
||||
return &StatT{
|
||||
size: s.Size,
|
||||
mode: uint32(s.Mode),
|
||||
uid: s.Uid,
|
||||
gid: s.Gid,
|
||||
rdev: uint64(s.Rdev),
|
||||
mtim: s.Mtimespec}, nil
|
||||
mtim: s.Mtimespec,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -4,10 +4,12 @@ import "syscall"
|
|||
|
||||
// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
|
||||
func fromStatT(s *syscall.Stat_t) (*StatT, error) {
|
||||
return &StatT{size: s.Size,
|
||||
return &StatT{
|
||||
size: s.Size,
|
||||
mode: uint32(s.Mode),
|
||||
uid: s.Uid,
|
||||
gid: s.Gid,
|
||||
rdev: uint64(s.Rdev),
|
||||
mtim: s.Mtimespec}, nil
|
||||
mtim: s.Mtimespec,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -4,13 +4,15 @@ import "syscall"
|
|||
|
||||
// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
|
||||
func fromStatT(s *syscall.Stat_t) (*StatT, error) {
|
||||
return &StatT{size: s.Size,
|
||||
return &StatT{
|
||||
size: s.Size,
|
||||
mode: s.Mode,
|
||||
uid: s.Uid,
|
||||
gid: s.Gid,
|
||||
// the type is 32bit on mips
|
||||
rdev: uint64(s.Rdev), //nolint: unconvert
|
||||
mtim: s.Mtim}, nil
|
||||
mtim: s.Mtim,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// FromStatT converts a syscall.Stat_t type to a system.Stat_t type
|
||||
|
|
|
@ -4,10 +4,12 @@ import "syscall"
|
|||
|
||||
// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
|
||||
func fromStatT(s *syscall.Stat_t) (*StatT, error) {
|
||||
return &StatT{size: s.Size,
|
||||
return &StatT{
|
||||
size: s.Size,
|
||||
mode: uint32(s.Mode),
|
||||
uid: s.Uid,
|
||||
gid: s.Gid,
|
||||
rdev: uint64(s.Rdev),
|
||||
mtim: s.Mtim}, nil
|
||||
mtim: s.Mtim,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -45,5 +45,6 @@ func fromStatT(fi *os.FileInfo) (*StatT, error) {
|
|||
return &StatT{
|
||||
size: (*fi).Size(),
|
||||
mode: (*fi).Mode(),
|
||||
mtim: (*fi).ModTime()}, nil
|
||||
mtim: (*fi).ModTime(),
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue