Sfoglia il codice sorgente

pkg/system: format code with gofumpt

Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 3 anni fa
parent
commit
fb017754e1

+ 2 - 4
pkg/system/init_windows.go

@@ -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) {

+ 4 - 2
pkg/system/stat_bsd.go

@@ -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 - 2
pkg/system/stat_darwin.go

@@ -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 - 2
pkg/system/stat_linux.go

@@ -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 - 2
pkg/system/stat_openbsd.go

@@ -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
 }

+ 2 - 1
pkg/system/stat_windows.go

@@ -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
 }