master
atomicFileWriter.Close
func (w *atomicFileWriter) Close() (retErr error) { defer func() { if retErr != nil || w.writeErr != nil { os.Remove(w.f.Name()) }