Skip to content

Commit

Permalink
chore: Add missing comment on helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
timo-reymann committed Aug 28, 2022
1 parent b2f039c commit fa71ecb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/features/conditions/contains_key.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package conditions

// ContiainsKey checks if the provided string (needle) is in the map (haystack)
func ContainsKey(haystack *map[string]string, needle string) bool {
if _, ok := (*haystack)[needle]; ok {
return ok
Expand Down
3 changes: 2 additions & 1 deletion pkg/zip/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ func registerCompressors(zipWriter *zip.Writer) {
}

func appendFile(srcFile string, zipWriter *zip.Writer, compression uint16, includeDirs bool) error {
output.Infof("Adding file %s", srcFile)
output.Infof("Adding %s", srcFile)

f, err := os.Open(srcFile)

// Ensure the open file is always closed, ignoring any errors during the close
defer func(f *os.File) {
if f != nil {
Expand Down

0 comments on commit fa71ecb

Please sign in to comment.