cmd/dockerd: 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
47276bdb28
commit
ee2ac6c205
6 changed files with 8 additions and 9 deletions
|
@ -142,7 +142,7 @@ func (cli *DaemonCli) start(opts *daemonOptions) (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := system.MkdirAll(cli.Config.ExecRoot, 0700); err != nil {
|
||||
if err := system.MkdirAll(cli.Config.ExecRoot, 0o700); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ func getDefaultDaemonConfigFile() (string, error) {
|
|||
// setDefaultUmask sets the umask to 0022 to avoid problems
|
||||
// caused by custom umask
|
||||
func setDefaultUmask() error {
|
||||
desiredUmask := 0022
|
||||
desiredUmask := 0o022
|
||||
unix.Umask(desiredUmask)
|
||||
if umask := unix.Umask(desiredUmask); umask != desiredUmask {
|
||||
return errors.Errorf("failed to set umask: expected %#o, got %#o", desiredUmask, umask)
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/containerd/log"
|
||||
"github.com/docker/docker/daemon/config"
|
||||
"github.com/docker/docker/pkg/system"
|
||||
"github.com/containerd/containerd/log"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
|
|
@ -17,9 +17,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
honorXDG bool
|
||||
)
|
||||
var honorXDG bool
|
||||
|
||||
func newDaemonCommand() (*cobra.Command, error) {
|
||||
cfg, err := config.New()
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/Microsoft/go-winio/pkg/etwlogrus"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/Microsoft/go-winio/pkg/etwlogrus"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func runDaemon(opts *daemonOptions) error {
|
||||
|
|
|
@ -26,7 +26,7 @@ func buildTestBinary(t *testing.T, tmpdir string, prefix string) (string, string
|
|||
}
|
||||
|
||||
func TestTrap(t *testing.T) {
|
||||
var sigmap = []struct {
|
||||
sigmap := []struct {
|
||||
name string
|
||||
signal os.Signal
|
||||
multiple bool
|
||||
|
|
Loading…
Reference in a new issue