Skip to content

Commit

Permalink
corrent log multiple items - need to rewrite method
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalObi committed Feb 11, 2021
1 parent c2516da commit ba492c0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions BE/cmd/api/models/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,24 @@ func (g *Group) GetByID(ctx context.Context, app *application.Application) error
return err
}

results := []Group{}

defer rows.Close()

for rows.Next() {
group := Group{}

err := rows.Scan(
&g.SheetID,
&g.GroupID,
&g.Name,
&g.Positions,
&group.SheetID,
&group.GroupID,
&group.Name,
&group.Positions,
)

fmt.Printf("%+v\n", g)
results = append(results, group)

fmt.Println("results")
fmt.Printf("%+v\n", results)

if err != nil {
return err
Expand Down

0 comments on commit ba492c0

Please sign in to comment.