Unify variable initialization 91/115391/1
authorPawel Wieczorek <p.wieczorek2@samsung.com>
Fri, 20 Nov 2020 15:19:34 +0000 (16:19 +0100)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Wed, 25 Nov 2020 14:55:49 +0000 (15:55 +0100)
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>
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 {