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
interface-go-dms3-core
Commits
c35356b2
Unverified
Commit
c35356b2
authored
Mar 25, 2019
by
Steven Allen
Committed by
GitHub
Mar 25, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21 from ipfs/feat/remove-wrap
remove Wrap
parents
0c1d0480
33e06486
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
51 deletions
+2
-51
.gx/lastpubver
.gx/lastpubver
+1
-1
options/unixfs.go
options/unixfs.go
+0
-13
package.json
package.json
+1
-1
tests/unixfs.go
tests/unixfs.go
+0
-36
No files found.
.gx/lastpubver
View file @
c35356b2
0.1.1
5
: Qma
LFN7mZFjJ1W9aQiPoY2WySnSqphmfZHQCPUtj2iqWVH
0.1.1
6
: Qma
WreJcDyf2BEAtGDfL1ETGrGAHR8KS8UCCPWd3QtDg8R
options/unixfs.go
View file @
c35356b2
...
@@ -33,8 +33,6 @@ type UnixfsAddSettings struct {
...
@@ -33,8 +33,6 @@ type UnixfsAddSettings struct {
FsCache
bool
FsCache
bool
NoCopy
bool
NoCopy
bool
Wrap
bool
Events
chan
<-
interface
{}
Events
chan
<-
interface
{}
Silent
bool
Silent
bool
Progress
bool
Progress
bool
...
@@ -65,8 +63,6 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix,
...
@@ -65,8 +63,6 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix,
FsCache
:
false
,
FsCache
:
false
,
NoCopy
:
false
,
NoCopy
:
false
,
Wrap
:
false
,
Events
:
nil
,
Events
:
nil
,
Silent
:
false
,
Silent
:
false
,
Progress
:
false
,
Progress
:
false
,
...
@@ -234,15 +230,6 @@ func (unixfsOpts) HashOnly(hashOnly bool) UnixfsAddOption {
...
@@ -234,15 +230,6 @@ func (unixfsOpts) HashOnly(hashOnly bool) UnixfsAddOption {
}
}
}
}
// Wrap tells the adder to wrap the added file structure with an additional
// directory.
func
(
unixfsOpts
)
Wrap
(
wrap
bool
)
UnixfsAddOption
{
return
func
(
settings
*
UnixfsAddSettings
)
error
{
settings
.
Wrap
=
wrap
return
nil
}
}
// Events specifies channel which will be used to report events about ongoing
// Events specifies channel which will be used to report events about ongoing
// Add operation.
// Add operation.
//
//
...
...
package.json
View file @
c35356b2
...
@@ -91,6 +91,6 @@
...
@@ -91,6 +91,6 @@
"license"
:
""
,
"license"
:
""
,
"name"
:
"interface-go-ipfs-core"
,
"name"
:
"interface-go-ipfs-core"
,
"releaseCmd"
:
"git commit -a -m
\"
gx publish $VERSION
\"
"
,
"releaseCmd"
:
"git commit -a -m
\"
gx publish $VERSION
\"
"
,
"version"
:
"0.1.1
5
"
"version"
:
"0.1.1
6
"
}
}
tests/unixfs.go
View file @
c35356b2
...
@@ -248,13 +248,6 @@ func (tp *provider) TestAdd(t *testing.T) {
...
@@ -248,13 +248,6 @@ func (tp *provider) TestAdd(t *testing.T) {
data
:
flatDir
,
data
:
flatDir
,
path
:
"/ipfs/QmRKGpFfR32FVXdvJiHfo4WJ5TDYBsM1P9raAp1p6APWSp"
,
path
:
"/ipfs/QmRKGpFfR32FVXdvJiHfo4WJ5TDYBsM1P9raAp1p6APWSp"
,
},
},
{
name
:
"simpleDirWrap"
,
data
:
flatDir
,
expect
:
wrapped
(
"QmRKGpFfR32FVXdvJiHfo4WJ5TDYBsM1P9raAp1p6APWSp"
),
path
:
"/ipfs/QmXxCaQkC8Z6Qws1nTkTQfCsL9y4XvWXnrPokp9bhmjC1L"
,
opts
:
[]
options
.
UnixfsAddOption
{
options
.
Unixfs
.
Wrap
(
true
)},
},
{
{
name
:
"simpleDir"
,
name
:
"simpleDir"
,
data
:
flatDir
,
data
:
flatDir
,
...
@@ -279,35 +272,6 @@ func (tp *provider) TestAdd(t *testing.T) {
...
@@ -279,35 +272,6 @@ func (tp *provider) TestAdd(t *testing.T) {
wrap
:
"foo"
,
wrap
:
"foo"
,
expect
:
wrapped
(
"foo"
),
expect
:
wrapped
(
"foo"
),
},
},
{
name
:
"stdinWrapped"
,
path
:
"/ipfs/QmU3r81oZycjHS9oaSHw37ootMFuFUw1DvMLKXPsezdtqU"
,
data
:
func
()
files
.
Node
{
return
files
.
NewBytesFile
([]
byte
(
helloStr
))
},
expect
:
func
(
files
.
Node
)
files
.
Node
{
return
files
.
NewMapDirectory
(
map
[
string
]
files
.
Node
{
"QmQy2Dw4Wk7rdJKjThjYXzfFJNaRKRHhHP5gHHXroJMYxk"
:
files
.
NewBytesFile
([]
byte
(
helloStr
)),
})
},
opts
:
[]
options
.
UnixfsAddOption
{
options
.
Unixfs
.
Wrap
(
true
)},
},
{
name
:
"twoLevelDirWrapped"
,
data
:
twoLevelDir
(),
wrap
:
"t"
,
expect
:
wrapped
(
"QmPwsL3T5sWhDmmAWZHAzyjKtMVDS9a11aHNRqb3xoVnmg"
,
"t"
),
path
:
"/ipfs/QmXzZwAh34pmNjuKsVGZfpbByis5S5qeZjCCUxa1ajZqzH"
,
opts
:
[]
options
.
UnixfsAddOption
{
options
.
Unixfs
.
Wrap
(
true
)},
},
{
name
:
"twoLevelInlineHash"
,
data
:
twoLevelDir
(),
wrap
:
"t"
,
expect
:
wrapped
(
"zBunoruKoyCHKkALNSWxDvj4L7yuQnMgQ4hUa9j1Z64tVcDEcu6Zdetyu7eeFCxMPfxb7YJvHeFHoFoHMkBUQf6vfdhmi"
,
"t"
),
path
:
"/ipfs/QmUX6GykDGHTMtLmDkfjqs48QwQK82vou51xwaY9TSU7Zo"
,
opts
:
[]
options
.
UnixfsAddOption
{
options
.
Unixfs
.
Wrap
(
true
),
options
.
Unixfs
.
Inline
(
true
),
options
.
Unixfs
.
RawLeaves
(
true
),
options
.
Unixfs
.
Hash
(
mh
.
SHA3
)},
},
// hidden
// hidden
{
{
name
:
"hiddenFilesAdded"
,
name
:
"hiddenFilesAdded"
,
...
...
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