forked from stefanmcshane/ldap
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add String() methods to DN and its subtypes (go-ldap#386)
* Add String() methods to DN and its subtypes This patch adds `String() string` methods to each of the following types: - DN - RelativeDN - AttributeTypeAndValue So that a `*DN` implements the `fmt.Stringer` interface. These methods also produce normalized strings: Attribute Type and Value are lowercased and joined with a "=" character while multiple attributes of a Relative DN are sorted lexicographically before being joined witha "+" character. This allows one to use the string representation of a DN as a map key and ensure that two DNs which `Equal()` eachother would have the same `String()` value. Docker-DCO-1.1-Signed-off-by: Josh Hawn <[email protected]> (github: jlhawn) * Mirror DN String() methods to v3 folder Co-authored-by: Josh Hawn <[email protected]>
- Loading branch information
Showing
4 changed files
with
179 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters