mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-19 14:54:22 +01:00
organize code and cleanup
This commit is contained in:
@@ -41,6 +41,7 @@ func NewPostgresContainer(logfile string) (*PostgresContainer, error) {
|
||||
return &PostgresContainer{
|
||||
password: "pgpassword",
|
||||
port: port,
|
||||
logfile: logfile,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -207,9 +208,9 @@ func (c *PostgresContainer) monitorLogs(ctx context.Context) {
|
||||
}
|
||||
defer i.Close()
|
||||
|
||||
file, err := os.OpenFile(c.logfile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600)
|
||||
file, err := os.Create(c.logfile)
|
||||
if err != nil {
|
||||
log.Printf("Could not create container log file: %v", err)
|
||||
log.Printf("Could not create container log file %v: %v", c.logfile, err)
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
Reference in New Issue
Block a user