MCPcopy Create free account
hub / github.com/Macmod/godap / getName

Function getName

tui/tree.go:791–804  ·  view source on GitHub ↗
(entry *ldap.Entry)

Source from the content-addressed store, hash-verified

789}
790
791func getName(entry *ldap.Entry) string {
792 nameIds := []string{"cn", "ou", "dc", "name", "uid"}
793 objectName := ""
794 for _, nameId := range nameIds {
795 currentId := entry.GetAttributeValue(nameId)
796
797 if currentId != "" {
798 objectName = currentId
799 break
800 }
801 }
802
803 return objectName
804}
805
806func getDN(entry *ldap.Entry) string {
807 dn := entry.DN

Callers 3

loadChildrenFunction · 0.85
getNodeNameFunction · 0.85
renderPartialTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected