Improve error handling

This commit is contained in:
Marco Realacci 2022-12-06 22:14:12 +01:00
parent df5b3fdda8
commit 3af4ee6c84
11 changed files with 34 additions and 35 deletions

View file

@ -34,6 +34,8 @@ func (db *appdbimpl) GetUserStream(uid string, start_index int, limit int) (*[]s
photos := make([]structures.Photo, 0)
defer rows.Close()
for rows.Next() {
// If there is a next row, we create an instance of Photo and add it to the slice
var photo structures.Photo