mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-03 18:29:16 +02:00
fix:#3 added error key in slog
This commit is contained in:
@@ -233,9 +233,10 @@ func getWeekEvents(start time.Time, end time.Time, cycle string) ([]time.Time, [
|
||||
endI, endIErr = getDayInt(days[1])
|
||||
|
||||
if endIErr != nil || startIErr != nil {
|
||||
slog.Error("Error while getting day int: "+days[0]+" - "+days[1]+" :", startIErr, endIErr)
|
||||
slog.Error("Error while getting day int: "+days[0]+" - "+days[1]+" :", "error", startIErr)
|
||||
slog.Error("Error while getting day int endErr: ", "error", endIErr)
|
||||
} else {
|
||||
//create a int array with all days from start to end day
|
||||
//create an int array with all days from start to end day
|
||||
var daysBetween []int
|
||||
for i := startI; i <= endI; i++ {
|
||||
daysBetween = append(daysBetween, i)
|
||||
@@ -442,7 +443,7 @@ func htmlRequest(url string) (*goquery.Document, error) {
|
||||
defer func(Body io.ReadCloser) {
|
||||
readErr := Body.Close()
|
||||
if readErr != nil {
|
||||
slog.Error("Error while closing response body from html request", readErr)
|
||||
slog.Error("Error while closing response body from html request", "error", readErr)
|
||||
return
|
||||
}
|
||||
}(resp.Body)
|
||||
|
Reference in New Issue
Block a user