From 5ef0fa10de2bbb23eef9fe87a9530caf3a4718d8 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 22 Feb 2020 18:22:27 +0100 Subject: [PATCH] gofmt compose loader test Signed-off-by: Sebastiaan van Stijn --- cli/compose/loader/merge_test.go | 46 ++++++++++++++++---------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/cli/compose/loader/merge_test.go b/cli/compose/loader/merge_test.go index 5055c68dba..5f374922dc 100644 --- a/cli/compose/loader/merge_test.go +++ b/cli/compose/loader/merge_test.go @@ -1024,18 +1024,18 @@ func TestMergeUlimitsConfig(t *testing.T) { }, } base := map[string]*types.UlimitsConfig{ - "override-single": &types.UlimitsConfig{Single: 100}, - "override-single-with-soft-hard": &types.UlimitsConfig{Single: 200}, - "override-soft-hard": &types.UlimitsConfig{Soft: 300, Hard: 301}, - "override-soft-hard-with-single": &types.UlimitsConfig{Soft: 400, Hard: 401}, - "dont-override": &types.UlimitsConfig{Single: 500}, + "override-single": {Single: 100}, + "override-single-with-soft-hard": {Single: 200}, + "override-soft-hard": {Soft: 300, Hard: 301}, + "override-soft-hard-with-single": {Soft: 400, Hard: 401}, + "dont-override": {Single: 500}, } override := map[string]*types.UlimitsConfig{ - "override-single": &types.UlimitsConfig{Single: 110}, - "override-single-with-soft-hard": &types.UlimitsConfig{Soft: 210, Hard: 211}, - "override-soft-hard": &types.UlimitsConfig{Soft: 310, Hard: 311}, - "override-soft-hard-with-single": &types.UlimitsConfig{Single: 410}, - "add": &types.UlimitsConfig{Single: 610}, + "override-single": {Single: 110}, + "override-single-with-soft-hard": {Soft: 210, Hard: 211}, + "override-soft-hard": {Soft: 310, Hard: 311}, + "override-soft-hard-with-single": {Single: 410}, + "add": {Single: 610}, } err := mergo.Merge(&base, &override, mergo.WithOverride, mergo.WithTransformers(specials)) assert.NilError(t, err) @@ -1043,12 +1043,12 @@ func TestMergeUlimitsConfig(t *testing.T) { t, base, map[string]*types.UlimitsConfig{ - "override-single": &types.UlimitsConfig{Single: 110}, - "override-single-with-soft-hard": &types.UlimitsConfig{Soft: 210, Hard: 211}, - "override-soft-hard": &types.UlimitsConfig{Soft: 310, Hard: 311}, - "override-soft-hard-with-single": &types.UlimitsConfig{Single: 410}, - "dont-override": &types.UlimitsConfig{Single: 500}, - "add": &types.UlimitsConfig{Single: 610}, + "override-single": {Single: 110}, + "override-single-with-soft-hard": {Soft: 210, Hard: 211}, + "override-soft-hard": {Soft: 310, Hard: 311}, + "override-soft-hard-with-single": {Single: 410}, + "dont-override": {Single: 500}, + "add": {Single: 610}, }, ) } @@ -1060,24 +1060,24 @@ func TestMergeServiceNetworkConfig(t *testing.T) { }, } base := map[string]*types.ServiceNetworkConfig{ - "override-aliases": &types.ServiceNetworkConfig{ + "override-aliases": { Aliases: []string{"100", "101"}, Ipv4Address: "127.0.0.1", Ipv6Address: "0:0:0:0:0:0:0:1", }, - "dont-override": &types.ServiceNetworkConfig{ + "dont-override": { Aliases: []string{"200", "201"}, Ipv4Address: "127.0.0.2", Ipv6Address: "0:0:0:0:0:0:0:2", }, } override := map[string]*types.ServiceNetworkConfig{ - "override-aliases": &types.ServiceNetworkConfig{ + "override-aliases": { Aliases: []string{"110", "111"}, Ipv4Address: "127.0.1.1", Ipv6Address: "0:0:0:0:0:0:1:1", }, - "add": &types.ServiceNetworkConfig{ + "add": { Aliases: []string{"310", "311"}, Ipv4Address: "127.0.3.1", Ipv6Address: "0:0:0:0:0:0:3:1", @@ -1089,17 +1089,17 @@ func TestMergeServiceNetworkConfig(t *testing.T) { t, base, map[string]*types.ServiceNetworkConfig{ - "override-aliases": &types.ServiceNetworkConfig{ + "override-aliases": { Aliases: []string{"110", "111"}, Ipv4Address: "127.0.1.1", Ipv6Address: "0:0:0:0:0:0:1:1", }, - "dont-override": &types.ServiceNetworkConfig{ + "dont-override": { Aliases: []string{"200", "201"}, Ipv4Address: "127.0.0.2", Ipv6Address: "0:0:0:0:0:0:0:2", }, - "add": &types.ServiceNetworkConfig{ + "add": { Aliases: []string{"310", "311"}, Ipv4Address: "127.0.3.1", Ipv6Address: "0:0:0:0:0:0:3:1",