MCPcopy
hub / github.com/micro-editor/micro / Close

Method Close

internal/buffer/save.go:183–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181}
182
183func (wf wrappedFile) Close() error {
184 err := wf.writeCloser.Close()
185 if wf.withSudo {
186 // wait for dd to finish and restart the screen if we used sudo
187 err := wf.cmd.Wait()
188 screen.TempStart(wf.screenb)
189
190 signal.Notify(util.Sigterm, os.Interrupt)
191 signal.Stop(wf.sigChan)
192
193 if err != nil {
194 return err
195 }
196 }
197 return err
198}
199
200func (b *SharedBuffer) overwriteFile(name string) (int, error) {
201 file, err := openFile(name, false)

Callers

nothing calls this directly

Calls 3

TempStartFunction · 0.92
StopMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected