From 5267c0d44aaad6d458427dbd7e6882a66c4c8fa4 Mon Sep 17 00:00:00 2001 From: Rijnard van Tonder Date: Wed, 10 Oct 2018 15:38:04 -0400 Subject: [PATCH] The nil check before the range loop is redundant Signed-off-by: Rijnard van Tonder --- pkg/chartutil/files.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/chartutil/files.go b/pkg/chartutil/files.go index c5496a8b0..36391c3e8 100644 --- a/pkg/chartutil/files.go +++ b/pkg/chartutil/files.go @@ -36,10 +36,8 @@ type Files map[string][]byte // Given an []*any.Any (the format for files in a chart.Chart), extract a map of files. func NewFiles(from []*any.Any) Files { files := map[string][]byte{} - if from != nil { - for _, f := range from { - files[f.TypeUrl] = f.Value - } + for _, f := range from { + files[f.TypeUrl] = f.Value } return files }