fix linter warning

This commit is contained in:
Ruidy 2024-08-21 17:09:50 +02:00
parent c1b1333a88
commit c79232a019
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
2 changed files with 4 additions and 4 deletions

View file

@ -119,7 +119,7 @@ func (ps PdfService) BuildReport(r *booking.Report, period string, month, year i
payload, err := json.Marshal(data)
if err != nil {
log.Warnf("Error marshalling JSON:", err)
log.Warnf("Error marshalling JSON: %s", err)
return err
}
@ -129,7 +129,7 @@ func (ps PdfService) BuildReport(r *booking.Report, period string, month, year i
func (ps PdfService) sendData(payload []byte) error {
req, err := http.NewRequest("POST", ps.url, bytes.NewBuffer(payload))
if err != nil {
log.Warnf("Error creating request:", err)
log.Warnf("Error creating request: %s", err)
return err
}
@ -139,7 +139,7 @@ func (ps PdfService) sendData(payload []byte) error {
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Warnf("Error sending request:", err)
log.Warnf("Error sending request: %s", err)
return err
}
defer resp.Body.Close()

View file

@ -255,7 +255,7 @@ func handleCreateItem(bs *booking.Service, cs *calendar.Service, hc *config.Host
fmt.Sprintf("Reservation: %s\n %d voyageur(s)\n", b.Name, b.CustomerNumber),
b.From, b.To,
); err != nil {
log.Printf("could not create event %w", err)
log.Warnf("could not create event: %s", err)
captureError(c, err)
}