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:
Sebastiaan van Stijn 2022-01-20 13:50:22 +01:00
parent 47276bdb28
commit ee2ac6c205
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
6 changed files with 8 additions and 9 deletions

View file

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

View file

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

View file

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

View file

@ -17,9 +17,7 @@ import (
"github.com/spf13/cobra"
)
var (
honorXDG bool
)
var honorXDG bool
func newDaemonCommand() (*cobra.Command, error) {
cfg, err := config.New()

View file

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

View file

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