MCPcopy Create free account
hub / github.com/Permify/permify / formatRelationship

Function formatRelationship

pkg/development/coverage/coverage.go:422–427  ·  view source on GitHub ↗

formatRelationship formats a relationship string

(entityName, relationName, subjectType, subjectRelation string)

Source from the content-addressed store, hash-verified

420
421// formatRelationship formats a relationship string
422func formatRelationship(entityName, relationName, subjectType, subjectRelation string) string {
423 if subjectRelation != "" {
424 return fmt.Sprintf("%s#%s@%s#%s", entityName, relationName, subjectType, subjectRelation)
425 }
426 return fmt.Sprintf("%s#%s@%s", entityName, relationName, subjectType)
427}
428
429// formatAttribute formats an attribute string
430func formatAttribute(entityName, attributeName string) string {

Callers 2

extractRelationshipsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected