MCPcopy Create free account
hub / github.com/AdRoll/baker / closeFiles

Function closeFiles

pkg/splitwriter/split_writer.go:320–327  ·  view source on GitHub ↗

closeFiles closes a list of files and returns the first error (if any).

(fs ...*os.File)

Source from the content-addressed store, hash-verified

318
319// closeFiles closes a list of files and returns the first error (if any).
320func closeFiles(fs ...*os.File) (cerr error) {
321 for _, f := range fs {
322 if err := f.Close(); err != nil && cerr == nil {
323 cerr = err
324 }
325 }
326 return
327}

Callers 3

TestCloseFilesFunction · 0.85
doNextSplitFunction · 0.85
doFirstSplitFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by 1

TestCloseFilesFunction · 0.68