Close closes the hint file
()
| 454 | |
| 455 | // Close closes the hint file |
| 456 | func (w *HintFileWriter) Close() error { |
| 457 | var err error |
| 458 | |
| 459 | if w.writer != nil { |
| 460 | if flushErr := w.writer.Flush(); flushErr != nil { |
| 461 | err = flushErr |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | if w.file != nil { |
| 466 | if closeErr := w.file.Close(); closeErr != nil && err == nil { |
| 467 | err = closeErr |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | return err |
| 472 | } |