Unify variable initialization 21/115421/3
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Fri, 20 Nov 2020 15:19:34 +0000 (16:19 +0100)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Thu, 26 Nov 2020 08:16:11 +0000 (08:16 +0000)
It is not possible to know "expected fails" list length upfront, hence
there is no need to call "make" on "xfails" map - there are no
optimization profits.

Issue-ID: INT-1582
Change-Id: I0e21d83098359359d17661e6265760d7e95739b9
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
(cherry picked from commit df618d1b68cd4907db084a2f73cc43c6bc2bb12a)

test/security/sslendpoints/main.go

index ce5948c..ddad51c 100644 (file)
@@ -47,7 +47,7 @@ func main() {
                listOptions = metav1.ListOptions{FieldSelector: "metadata.namespace=" + *namespace}
        }
 
-       xfails := make(map[uint16]string)
+       var xfails map[uint16]string
        if *xfailName != "" {
                xfailFile, err := os.Open(*xfailName)
                if err != nil {