Skip to content

Commit

Permalink
Add explicit documentation regarding null bytes to Path.
Browse files Browse the repository at this point in the history
There's already explicit sections for empty string and slash cases, on the basis of how likely those are to provoke questions (even though the content is essentially to highlight how *not* exceptional they are); it makes just as much sense to do the same call out for null bytes.

Co-Authored-By: Peter Rabbitson <ribasushi@leporine.io>
  • Loading branch information
warpfork and ribasushi committed Feb 27, 2020
1 parent a48c9db commit ae08d2d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions path.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ import (
// filesystems); but, as with empty strings, maps which contain such a key
// certainly exist, and it is important that we be able to regard them!)
//
// Lastly a string starting, ending, or otherwise containing the NUL (\x00) byte
// is also a valid PathSegment. This is of marked concern for languages implementing
// "C-style nul-terminated strings". When working with IPLD in such environments
// an implementation is required to accommodate NUL-containing paths
// For an IPLD Path to be represented as a string, an encoding system
// including escaping is necessary. At present, there is not a single
// canonical specification for such an escaping; we expect to decide one
Expand Down

0 comments on commit ae08d2d

Please sign in to comment.