chore(code): cleaning
This commit is contained in:
@ -37,7 +37,6 @@ func (w *DatabaseWriter) Write(p []byte) (n int, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func newDatabaseWriter(dbPool *sql.DB, imageId uuid.UUID) *DatabaseWriter {
|
func newDatabaseWriter(dbPool *sql.DB, imageId uuid.UUID) *DatabaseWriter {
|
||||||
io.MultiWriter()
|
|
||||||
return &DatabaseWriter{
|
return &DatabaseWriter{
|
||||||
dbPool: dbPool,
|
dbPool: dbPool,
|
||||||
imageId: imageId,
|
imageId: imageId,
|
||||||
@ -45,8 +44,7 @@ func newDatabaseWriter(dbPool *sql.DB, imageId uuid.UUID) *DatabaseWriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func createDbStdoutWriter(dbPool *sql.DB, imageId uuid.UUID) io.Writer {
|
func createDbStdoutWriter(dbPool *sql.DB, imageId uuid.UUID) io.Writer {
|
||||||
dbWriter := newDatabaseWriter(dbPool, imageId)
|
return io.MultiWriter(os.Stdout, newDatabaseWriter(dbPool, imageId))
|
||||||
return io.MultiWriter(os.Stdout, dbWriter)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func createLogger(prefix string, writer io.Writer) *log.Logger {
|
func createLogger(prefix string, writer io.Writer) *log.Logger {
|
||||||
|
Reference in New Issue
Block a user