Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
15
func
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
24
func
writeFile(f *os.File) {
25
fmt.Println(
"writing"
)
Callers
1
main
Function · 0.70
Calls
1
Println
Method · 0.80
Tested by
no test coverage detected