This repository has been archived on 2024-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
golang-rest-example/pkg/groups.go
2024-02-01 19:57:25 +01:00

18 lines
343 B
Go

package groups
import (
"context"
"github.com/mentos1386/golang-rest-example/pkg/api"
)
type groupServer struct {
groups map[int64]*api.Group
}
func (u *groupServer) groupsGet(ctx context.Context) ([]api.Group, error) {
var groups []api.Group
for _, group := range u.groups {
groups = append(groups, *group)
}
return groups, nil
}