Fix lint errors: handle errors, use fmt.Fprintf, apply De Morgan's law, use switch statements
Amp-Thread-ID: https://ampcode.com/threads/T-afcf56b0-a8bc-4310-bb59-1b63e1d70c89 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -249,7 +249,7 @@ func TestDaemonLogFileCreation(t *testing.T) {
|
||||
|
||||
timestamp := time.Now().Format("2006-01-02 15:04:05")
|
||||
msg := "Test log message"
|
||||
_, err = logF.WriteString(fmt.Sprintf("[%s] %s\n", timestamp, msg))
|
||||
_, err = fmt.Fprintf(logF, "[%s] %s\n", timestamp, msg)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to write to log file: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user