go vet
This commit is contained in:
parent
d91de014e9
commit
02cac422f4
4 changed files with 17 additions and 18 deletions
|
@ -4,7 +4,6 @@ package repositories
|
|||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"log"
|
||||
"sprechstundentool/config"
|
||||
"sprechstundentool/models"
|
||||
)
|
||||
|
@ -131,7 +130,7 @@ func (r *OfficeHourRepo) getFromRow(row *sql.Row) (models.OfficeHour, error) {
|
|||
if err != nil {
|
||||
return models.OfficeHour{}, fmt.Errorf("Error getting single officeHours row from database: %s", err.Error())
|
||||
}
|
||||
officeHour.Date = models.Date{week, day, hour, minute}
|
||||
officeHour.Date = models.Date{Week: week, Day: day, Hour: hour, Minute: minute}
|
||||
officeHour.Room, _ = r.roomRepo.FindById(roomId)
|
||||
officeHour.Tutor, _ = r.tutorRepo.FindById(tutorId)
|
||||
officeHour.Course, _ = r.courseRepo.FindById(courseId)
|
||||
|
@ -146,7 +145,7 @@ func (r *OfficeHourRepo) getFromRows(rows *sql.Rows) ([]models.OfficeHour, error
|
|||
if err := rows.Scan(&officeHour.Id, &tutorId, &day, &hour, &minute, &roomId, &courseId, &week, &officeHour.Info, &officeHour.Active, &officeHour.Duration); err != nil {
|
||||
return officeHours, fmt.Errorf("Error getting multiple officeHour rows from database: %s", err.Error())
|
||||
}
|
||||
officeHour.Date = models.Date{week, day, hour, minute}
|
||||
officeHour.Date = models.Date{Week: week, Day: day, Hour: hour, Minute: minute}
|
||||
officeHour.Room, _ = r.roomRepo.FindById(roomId)
|
||||
officeHour.Tutor, _ = r.tutorRepo.FindById(tutorId)
|
||||
officeHour.Course, _ = r.courseRepo.FindById(courseId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue