appendToFile appends text to a file.
(path, text string)
| 528 | |
| 529 | // appendToFile appends text to a file. |
| 530 | func appendToFile(path, text string) error { |
| 531 | f, err := os.OpenFile(path, os.O_APPEND|os.O_WRONLY, 0o644) |
| 532 | if err != nil { |
| 533 | return err |
| 534 | } |
| 535 | defer f.Close() |
| 536 | _, err = f.WriteString(text) |
| 537 | return err |
| 538 | } |
| 539 | |
| 540 | // pgIsReady checks if PostgreSQL is running and accepting connections. |
| 541 | func pgIsReady() bool { |
no test coverage detected