Unverified Commit dfd0279b authored by Adam Reese's avatar Adam Reese Committed by GitHub
Browse files

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

Remove redundant nil checks
Showing with 2 additions and 4 deletions
+2 -4
...@@ -36,10 +36,8 @@ type Files map[string][]byte ...@@ -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
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment