From 2a8e435671186bead0e02b13f55e118724175cce Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 22 Apr 2022 11:51:53 +0200 Subject: enable staticcheck linter Fix many problems reported by the staticcheck linter, including many real bugs! Signed-off-by: Paul Holzinger --- test/utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/utils/utils.go') diff --git a/test/utils/utils.go b/test/utils/utils.go index 39a0ac875..9695835e5 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -439,10 +439,10 @@ func tagOutputToMap(imagesOutput []string) map[string]map[string]bool { // GetHostDistributionInfo returns a struct with its distribution Name and version func GetHostDistributionInfo() HostOS { f, err := os.Open(OSReleasePath) - defer f.Close() if err != nil { return HostOS{} } + defer f.Close() l := bufio.NewScanner(f) host := HostOS{} -- cgit v1.2.3-54-g00ecf