Skip to content

Commit

Permalink
Documentation.
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
  • Loading branch information
kevina committed Oct 19, 2017
1 parent 253b379 commit 6d1d38c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions merkledag/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ var v1CidPrefix = cid.Prefix{
Version: 1,
}

// V0CidPrefix returns a prefix for CIDv0
func V0CidPrefix() cid.Prefix { return v0CidPrefix }

// V1CidPrefix returns a prefix for CIDv1 with the default settings
func V1CidPrefix() cid.Prefix { return v1CidPrefix }

// PrefixForCidVersion returns the Protobuf prefix for a given CID version
Expand Down
2 changes: 1 addition & 1 deletion unixfs/hamt/hamt.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (ds *HamtShard) SetPrefix(prefix *cid.Prefix) {
ds.prefix = prefix
}

// GetPrefix gets the CID Prefix, may be nil if unset
// Prefix gets the CID Prefix, may be nil if unset
func (ds *HamtShard) Prefix() *cid.Prefix {
return ds.prefix
}
Expand Down
1 change: 1 addition & 0 deletions unixfs/io/dirbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func (d *Directory) GetNode() (node.Node, error) {
return d.shard.Node()
}

// GetPrefix returns the CID Prefix used
func (d *Directory) GetPrefix() *cid.Prefix {
if d.shard == nil {
return &d.dirnode.Prefix
Expand Down
1 change: 1 addition & 0 deletions unixfs/test/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func GetDAGServ() mdag.DAGService {
return mdagmock.Mock()
}

// NodeOpts is used by GetNode, GetEmptyNode and GetRandomNode
type NodeOpts struct {
Prefix cid.Prefix
// ForceRawLeaves if true will force the use of raw leaves
Expand Down

0 comments on commit 6d1d38c

Please sign in to comment.