MCPcopy Create free account
hub / github.com/cli/cli / writeFile

Function writeFile

script/ghmock/export.go:162–172  ·  view source on GitHub ↗
(path string, write func(io.Writer) error)

Source from the content-addressed store, hash-verified

160}
161
162func writeFile(path string, write func(io.Writer) error) error {
163 f, err := os.Create(path)
164 if err != nil {
165 return err
166 }
167 if err := write(f); err != nil {
168 f.Close()
169 return err
170 }
171 return f.Close()
172}
173
174// writeExportReport writes what each run printed, after its full command and
175// the schema files it checked against.

Callers 11

writeExportDirFunction · 0.70
graders.test.tsFile · 0.50
replay.test.tsFile · 0.50
observedProcessFunction · 0.50
harness.test.tsFile · 0.50
mainFunction · 0.50
saveFunction · 0.50
prepareHomeFunction · 0.50
writeGhWrapperFunction · 0.50
provisionFunction · 0.50
openFunction · 0.50

Calls 2

CreateMethod · 0.65
CloseMethod · 0.65

Tested by 1

observedProcessFunction · 0.40