From 796638661531ac9d524224a9101d439094665d44 Mon Sep 17 00:00:00 2001 From: Donny Xia Date: Fri, 6 Nov 2020 15:17:56 -0800 Subject: [PATCH] improve format --- kyaml/sets/stringlist.go | 2 +- kyaml/yaml/merge3/element_test.go | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/kyaml/sets/stringlist.go b/kyaml/sets/stringlist.go index c3181cac9..2d75978fc 100644 --- a/kyaml/sets/stringlist.go +++ b/kyaml/sets/stringlist.go @@ -31,7 +31,7 @@ func (s StringList) Has(val []string) bool { return false } -func isStringSliceEqual (s []string, t []string) bool { +func isStringSliceEqual(s []string, t []string) bool { if len(s) != len(t) { return false } diff --git a/kyaml/yaml/merge3/element_test.go b/kyaml/yaml/merge3/element_test.go index ca1626f30..e226b517d 100644 --- a/kyaml/yaml/merge3/element_test.go +++ b/kyaml/yaml/merge3/element_test.go @@ -1288,9 +1288,9 @@ spec: // // Test Case // -{ - description: `Add a containerPort with protocol to an existing list`, - origin: ` + { + description: `Add a containerPort with protocol to an existing list`, + origin: ` apiVersion: apps/v1 kind: Deployment spec: @@ -1303,7 +1303,7 @@ spec: - containerPort: 8080 protocol: UDP `, - update: ` + update: ` apiVersion: apps/v1 kind: Deployment spec: @@ -1318,7 +1318,7 @@ spec: - containerPort: 8080 protocol: TCP `, - local: ` + local: ` apiVersion: apps/v1 kind: Deployment spec: @@ -1331,7 +1331,7 @@ spec: - containerPort: 8080 protocol: UDP `, // output should have both - expected: ` + expected: ` apiVersion: apps/v1 kind: Deployment spec: @@ -1345,15 +1345,15 @@ spec: protocol: UDP `}, -// -// Test Case -// -{ -description: `Add a containerPort with protocol to a non-existing list, existing in dest`, -origin: ` + // + // Test Case + // + { + description: `Add a containerPort with protocol to a non-existing list, existing in dest`, + origin: ` apiVersion: apps/v1 kind: Deployment`, -update: ` + update: ` apiVersion: apps/v1 kind: Deployment spec: @@ -1366,7 +1366,7 @@ spec: - containerPort: 8080 protocol: UDP `, -local: ` + local: ` apiVersion: apps/v1 kind: Deployment spec: @@ -1379,7 +1379,7 @@ spec: - containerPort: 8080 protocol: TCP `, // output should have both -expected: ` + expected: ` apiVersion: apps/v1 kind: Deployment spec: