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-chunker
Commits
0bee44ab
Commit
0bee44ab
authored
Sep 07, 2018
by
Kejie Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update test and fmt code
parent
56321ac9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
parse.go
parse.go
+1
-1
parse_test.go
parse_test.go
+4
-4
No files found.
parse.go
View file @
0bee44ab
...
...
@@ -55,7 +55,7 @@ func parseRabinString(r io.Reader, chunker string) (Splitter, error) {
return
nil
,
err
}
if
min
<
16
{
return
nil
,
ErrRabinMin
return
nil
,
ErrRabinMin
}
sub
=
strings
.
Split
(
parts
[
2
],
":"
)
if
len
(
sub
)
>
1
&&
sub
[
0
]
!=
"avg"
{
...
...
parse_test.go
View file @
0bee44ab
package
chunk
import
(
"testing"
"bytes"
"testing"
)
func
TestParse
(
t
*
testing
.
T
)
{
...
...
@@ -15,7 +15,7 @@ func TestParse(t *testing.T) {
t
.
Errorf
(
err
.
Error
())
}
_
,
err
=
parseRabinString
(
r
,
chk2
)
if
err
==
nil
||
err
.
Error
()
!=
ErrRabinMin
.
Error
()
{
t
.
Errorf
(
"it should be
a
ErrRabinMin here."
)
if
err
==
ErrRabinMin
{
t
.
Log
(
"it should be ErrRabinMin here."
)
}
}
\ No newline at end of file
}
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