MCPcopy Create free account
hub / github.com/Go-Learning-Land/Go-Learning-Archive / createFile

Function createFile

GolangBasics/GoByExample/044Defer.go:15–22  ·  view source on GitHub ↗
(p string)

Source from the content-addressed store, hash-verified

13}
14
15func createFile(p string) *os.File {
16 fmt.Println("creating")
17 f, err := os.Create(p)
18 if err != nil {
19 panic(err)
20 }
21 return f
22}
23
24func writeFile(f *os.File) {
25 fmt.Println("writing")

Callers 1

mainFunction · 0.70

Calls 1

PrintlnMethod · 0.80

Tested by

no test coverage detected