The nil check before the range loop is redundant

Signed-off-by: Rijnard van Tonder <hi.teresy@gmail.com>
pull/4207/head^2
Rijnard van Tonder 7 years ago committed by Sebastien Plisson
parent 1d4119175e
commit b0783a330e

@ -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. // Given an []*any.Any (the format for files in a chart.Chart), extract a map of files.
func NewFiles(from []*any.Any) Files { func NewFiles(from []*any.Any) Files {
files := map[string][]byte{} files := map[string][]byte{}
if from != nil { for _, f := range from {
for _, f := range from { files[f.TypeUrl] = f.Value
files[f.TypeUrl] = f.Value
}
} }
return files return files
} }

Loading…
Cancel
Save