MCPcopy
hub / github.com/kopia/kopia / writeLinesToFile

Function writeLinesToFile

tools/gettool/gettool.go:232–245  ·  view source on GitHub ↗
(lines []string)

Source from the content-addressed store, hash-verified

230}
231
232func writeLinesToFile(lines []string) error {
233 f, err := os.Create(*regenerateChecksums)
234 if err != nil {
235 return errors.Wrap(err, "writeLinesToFile")
236 }
237
238 defer f.Close() //nolint:errcheck
239
240 for _, l := range lines {
241 fmt.Fprintln(f, l) //nolint:errcheck
242 }
243
244 return nil
245}
246
247func downloadTool(toolName, toolVersion string, oldChecksums, downloadedChecksums map[string]string, errorCount *int) error {
248 t, ok := tools[toolName]

Callers 1

mainFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected