fix new lint warnings

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-08-14 08:46:18 +02:00
parent 6f8bc59756
commit 121d5ae34d
9 changed files with 25 additions and 26 deletions

View File

@@ -28,10 +28,10 @@ type LegoAdapter struct {
// Fatal emits a log at Error level
func (l *LegoAdapter) Fatal(args ...any) {
if l.LogToConsole {
ErrorToConsole(fmt.Sprint(args...))
ErrorToConsole("%s", fmt.Sprint(args...))
return
}
Log(LevelError, legoLogSender, "", fmt.Sprint(args...))
Log(LevelError, legoLogSender, "", "%s", fmt.Sprint(args...))
}
// Fatalln is the same as Fatal
@@ -51,10 +51,10 @@ func (l *LegoAdapter) Fatalf(format string, args ...any) {
// Print emits a log at Info level
func (l *LegoAdapter) Print(args ...any) {
if l.LogToConsole {
InfoToConsole(fmt.Sprint(args...))
InfoToConsole("%s", fmt.Sprint(args...))
return
}
Log(LevelInfo, legoLogSender, "", fmt.Sprint(args...))
Log(LevelInfo, legoLogSender, "", "%s", fmt.Sprint(args...))
}
// Println is the same as Print