mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-05 01:21:17 +02:00
create GroupList type and methods
This commit is contained in:
parent
4655483fb6
commit
f5db8e64b3
17
models/group/group_list.go
Normal file
17
models/group/group_list.go
Normal file
@ -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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user