From f5db8e64b3944a4441ab8d6f0a0c7f96821fbf2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 25 Dec 2024 15:40:50 -0500 Subject: [PATCH] create GroupList type and methods --- models/group/group_list.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 models/group/group_list.go diff --git a/models/group/group_list.go b/models/group/group_list.go new file mode 100644 index 0000000000..c7710d950b --- /dev/null +++ b/models/group/group_list.go @@ -0,0 +1,17 @@ +package group + +import ( + "context" +) + +type GroupList []*Group + +func (groups GroupList) LoadOwners(ctx context.Context) error { + for _, g := range groups { + err := g.LoadOwner(ctx) + if err != nil { + return err + } + } + return nil +}