MCPcopy Index your code
hub / github.com/atomicgo/cursor / clearFile

Function clearFile

cursor_test_linux.go:114–130  ·  view source on GitHub ↗
(t *testing.T, file *os.File)

Source from the content-addressed store, hash-verified

112}
113
114func clearFile(t *testing.T, file *os.File) {
115 t.Helper()
116
117 err := file.Truncate(0)
118 if err != nil {
119 t.Errorf("failed to clear file")
120
121 return
122 }
123
124 _, err = file.Seek(0, 0)
125 if err != nil {
126 t.Errorf("failed to clear file")
127
128 return
129 }
130}

Callers 1

TestCustomIOWriterFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCustomIOWriterFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…