Add HasPeers function to group

This commit is contained in:
bcmmbaga 2024-07-18 19:59:14 +03:00
parent 1b28d1dfbc
commit 1012c2f990
No known key found for this signature in database
GPG Key ID: 7249A19D20613553

View File

@ -44,3 +44,8 @@ func (g *Group) Copy() *Group {
copy(group.Peers, g.Peers)
return group
}
// HasPeers checks if the group has any peers.
func (g *Group) HasPeers() bool {
return len(g.Peers) > 0
}