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-datastore
Commits
3a579732
Commit
3a579732
authored
Jun 11, 2016
by
Jakub Sztandera
Committed by
GitHub
Jun 11, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from ipfs-filestore/measure-fix
In the measure package don't return ErrInvalidType in batch Put.
parents
4171e3db
2353e253
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
measure/measure.go
measure/measure.go
+2
-3
No files found.
measure/measure.go
View file @
3a579732
...
...
@@ -179,10 +179,9 @@ func (m *measure) Batch() (datastore.Batch, error) {
func
(
mt
*
measuredBatch
)
Put
(
key
datastore
.
Key
,
val
interface
{})
error
{
mt
.
puts
++
valb
,
ok
:=
val
.
([]
byte
)
if
!
ok
{
return
datastore
.
ErrInvalidType
}
if
ok
{
_
=
mt
.
m
.
putSize
.
RecordValue
(
int64
(
len
(
valb
)))
}
return
mt
.
putts
.
Put
(
key
,
val
)
}
...
...
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