From 5cc1c6eca0990362264ead21d497557f5f030d06 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 20 Jan 2022 13:55:48 +0100 Subject: [PATCH] integration/service: format code with gofumpt Formatting the code with https://github.com/mvdan/gofumpt Signed-off-by: Sebastiaan van Stijn --- integration/service/create_test.go | 6 +++--- integration/service/inspect_test.go | 2 +- integration/service/update_test.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integration/service/create_test.go b/integration/service/create_test.go index e394f5b600..5db29229ce 100644 --- a/integration/service/create_test.go +++ b/integration/service/create_test.go @@ -31,7 +31,7 @@ func TestServiceCreateInit(t *testing.T) { func testServiceCreateInit(daemonEnabled bool) func(t *testing.T) { return func(t *testing.T) { - var ops = []daemon.Option{} + ops := []daemon.Option{} if daemonEnabled { ops = append(ops, daemon.WithInit()) @@ -272,7 +272,7 @@ func TestCreateServiceSecretFileMode(t *testing.T) { Name: "/etc/secret", UID: "0", GID: "0", - Mode: 0777, + Mode: 0o777, }, SecretID: secretResp.ID, SecretName: secretName, @@ -329,7 +329,7 @@ func TestCreateServiceConfigFileMode(t *testing.T) { Name: "/etc/config", UID: "0", GID: "0", - Mode: 0777, + Mode: 0o777, }, ConfigID: configResp.ID, ConfigName: configName, diff --git a/integration/service/inspect_test.go b/integration/service/inspect_test.go index 5d8f12dbc3..90c5b13b5c 100644 --- a/integration/service/inspect_test.go +++ b/integration/service/inspect_test.go @@ -25,7 +25,7 @@ func TestInspect(t *testing.T) { client := d.NewClientT(t) defer client.Close() - var now = time.Now() + now := time.Now() var instances uint64 = 2 serviceSpec := fullSwarmServiceSpec("test-service-inspect"+t.Name(), instances) diff --git a/integration/service/update_test.go b/integration/service/update_test.go index a0952f35cc..77690f28a4 100644 --- a/integration/service/update_test.go +++ b/integration/service/update_test.go @@ -104,7 +104,7 @@ func TestServiceUpdateSecrets(t *testing.T) { Name: secretTarget, UID: "0", GID: "0", - Mode: 0600, + Mode: 0o600, }, SecretID: resp.ID, SecretName: secretName, @@ -166,7 +166,7 @@ func TestServiceUpdateConfigs(t *testing.T) { Name: configTarget, UID: "0", GID: "0", - Mode: 0600, + Mode: 0o600, }, ConfigID: resp.ID, ConfigName: configName,