Commit 414b0ff1 authored by Steven Allen's avatar Steven Allen

use DefaultSplitter function where appropriate

License: MIT
Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
parent 101e1c3c
......@@ -11,7 +11,7 @@ import (
func FromString(r io.Reader, chunker string) (Splitter, error) {
switch {
case chunker == "" || chunker == "default":
return NewSizeSplitter(r, DefaultBlockSize), nil
return DefaultSplitter(r), nil
case strings.HasPrefix(chunker, "size-"):
sizeStr := strings.Split(chunker, "-")[1]
......
......@@ -34,7 +34,7 @@ func BuildDagFromFile(fpath string, ds dag.DAGService) (node.Node, error) {
}
defer f.Close()
return BuildDagFromReader(ds, chunk.NewSizeSplitter(f, chunk.DefaultBlockSize))
return BuildDagFromReader(ds, chunk.DefaultSplitter(f))
}
func BuildDagFromReader(ds dag.DAGService, spl chunk.Splitter) (node.Node, error) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment