Merge pull request #4757 from teresy/redundant-nil-check-slice

Remove redundant nil checks
pull/4762/head
Adam Reese 6 years ago committed by GitHub
commit dfd0279b13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
}

Loading…
Cancel
Save