Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
0182e597
Commit
0182e597
authored
Oct 19, 2017
by
Kevin Atkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation.
License: MIT Signed-off-by:
Kevin Atkinson
<
k@kevina.org
>
parent
798afedf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
1 deletion
+6
-1
merkledag/node.go
merkledag/node.go
+3
-0
unixfs/hamt/hamt.go
unixfs/hamt/hamt.go
+1
-1
unixfs/io/dirbuilder.go
unixfs/io/dirbuilder.go
+1
-0
unixfs/test/utils.go
unixfs/test/utils.go
+1
-0
No files found.
merkledag/node.go
View file @
0182e597
...
...
@@ -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
...
...
unixfs/hamt/hamt.go
View file @
0182e597
...
...
@@ -131,7 +131,7 @@ func (ds *HamtShard) SetPrefix(prefix *cid.Prefix) {
ds
.
prefix
=
prefix
}
//
Get
Prefix 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
}
...
...
unixfs/io/dirbuilder.go
View file @
0182e597
...
...
@@ -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
...
...
unixfs/test/utils.go
View file @
0182e597
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment