Skip to content

Commit

Permalink
Resolving lint errors for main and entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhur committed Dec 7, 2024
1 parent f0bf927 commit 5039841
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 0 additions & 1 deletion cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,4 @@ func main() {
}

<-idleConnsClosed

}
19 changes: 11 additions & 8 deletions pkg/log/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@ type Entry interface {
Printf(format string, args ...interface{})

// Debug logs a debug message
Debug(...interface{})
Debug(args ...interface{})

// Info logs an info message
Info(...interface{})
Info(args ...interface{})

// Warn logs a warning message
Warn(...interface{})
Warn(args ...interface{})

// Error logs an error message
Error(...interface{})
Error(args ...interface{})

// Fatal logs a fatal message and terminates the program
Fatal(...interface{})
Fatal(args ...interface{})

// Panic logs a panic message and panics
Panic(...interface{})
Panic(args ...interface{})

// Print logs a message at default level
Print(...interface{})
Print(args ...interface{})

// WithFields returns a new Entry with the provided fields added
WithFields(fields map[string]any) Entry
Expand Down Expand Up @@ -206,7 +206,10 @@ func (e *entry) WriterLevel(level slog.Level) *io.PipeWriter {
for scanner.Scan() {
logFn(scanner.Text())
}
r.Close()
err := r.Close()
if err != nil {
e.Error(err)
}
}(reader, logFunc)

return writer
Expand Down

0 comments on commit 5039841

Please sign in to comment.