formatGroupName returns "groups/{email}" if email is set, otherwise "groups/{id}". This mirrors utils.FormatGroupName but avoids a circular import.
(group *GroupMessage)
| 151 | // formatGroupName returns "groups/{email}" if email is set, otherwise "groups/{id}". |
| 152 | // This mirrors utils.FormatGroupName but avoids a circular import. |
| 153 | func formatGroupName(group *GroupMessage) string { |
| 154 | if group.Email != "" { |
| 155 | return "groups/" + group.Email |
| 156 | } |
| 157 | return "groups/" + group.ID |
| 158 | } |
| 159 | |
| 160 | func getGroupCacheKey(workspace string, group *GroupMessage) string { |
| 161 | return fmt.Sprintf("workspaces/%s/%s", workspace, formatGroupName(group)) |
no outgoing calls
no test coverage detected