MCPcopy Create free account
hub / github.com/bytebase/bytebase / formatGroupName

Function formatGroupName

backend/store/store.go:153–158  ·  view source on GitHub ↗

formatGroupName returns "groups/{email}" if email is set, otherwise "groups/{id}". This mirrors utils.FormatGroupName but avoids a circular import.

(group *GroupMessage)

Source from the content-addressed store, hash-verified

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

Callers 2

getGroupCacheKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected