-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add `NilID` function for getting a zero value for `xid.ID` * Add `ID.Bytes` and `FromBytes` functions for converting between `ID` and `[]byte` * Add `ID.Compare` method `ID.Compare` method behaves just like `bytes.Compare`. * Add `Sort` function for sorting `ID` array Under the hood we implement `sort.Interface` on wrapper type `sorter` of `[]ID`, then use `sort.Sort` to do the heavy lifting.
- Loading branch information
1 parent
1ed2fb9
commit 12be76b
Showing
2 changed files
with
154 additions
and
0 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