-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
base32: make GetEncoderFromPath more robust
Primarily, get rid of extractCidString and cidVer. Neither of these functions did sane things when a path when a path didn't actually include a CID. For example, "boo" would yield a base32 encoder. Also: * Avoid "optional" errors. * Make it a pure function of the input path. * Extract the multibase from *any* type of path of the form /namespace/cid-like-thing/... This is a DWIM function. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
- Loading branch information
Showing
4 changed files
with
121 additions
and
49 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