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
414b0ff1
Commit
414b0ff1
authored
Dec 19, 2017
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use DefaultSplitter function where appropriate
License: MIT Signed-off-by:
Steven Allen
<
steven@stebalien.com
>
parent
101e1c3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
importer/chunk/parse.go
importer/chunk/parse.go
+1
-1
importer/importer.go
importer/importer.go
+1
-1
No files found.
importer/chunk/parse.go
View file @
414b0ff1
...
...
@@ -11,7 +11,7 @@ import (
func
FromString
(
r
io
.
Reader
,
chunker
string
)
(
Splitter
,
error
)
{
switch
{
case
chunker
==
""
||
chunker
==
"default"
:
return
NewSize
Splitter
(
r
,
DefaultBlockSize
),
nil
return
Default
Splitter
(
r
),
nil
case
strings
.
HasPrefix
(
chunker
,
"size-"
)
:
sizeStr
:=
strings
.
Split
(
chunker
,
"-"
)[
1
]
...
...
importer/importer.go
View file @
414b0ff1
...
...
@@ -34,7 +34,7 @@ func BuildDagFromFile(fpath string, ds dag.DAGService) (node.Node, error) {
}
defer
f
.
Close
()
return
BuildDagFromReader
(
ds
,
chunk
.
NewSize
Splitter
(
f
,
chunk
.
DefaultBlockSize
))
return
BuildDagFromReader
(
ds
,
chunk
.
Default
Splitter
(
f
))
}
func
BuildDagFromReader
(
ds
dag
.
DAGService
,
spl
chunk
.
Splitter
)
(
node
.
Node
,
error
)
{
...
...
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