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
8b5f0c5d
Unverified
Commit
8b5f0c5d
authored
Nov 04, 2017
by
Steven Allen
Committed by
GitHub
Nov 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71 from ipfs/fix/go-tip
Fix warnings and errors on go-tip
parents
1be0c64e
20631b1c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
8 deletions
+4
-8
basic_ds.go
basic_ds.go
+1
-1
coalesce/coalesce_test.go
coalesce/coalesce_test.go
+2
-2
namespace/namespace.go
namespace/namespace.go
+0
-3
query/query.go
query/query.go
+0
-1
test/basic_tests.go
test/basic_tests.go
+1
-1
No files found.
basic_ds.go
View file @
8b5f0c5d
...
...
@@ -170,7 +170,7 @@ func (d *LogDatastore) Delete(key Key) (err error) {
func
(
d
*
LogDatastore
)
Query
(
q
dsq
.
Query
)
(
dsq
.
Results
,
error
)
{
log
.
Printf
(
"%s: Query
\n
"
,
d
.
Name
)
log
.
Printf
(
"%s: q.Prefix: %s
\n
"
,
d
.
Name
,
q
.
Prefix
)
log
.
Printf
(
"%s: q.KeysOnly: %
s
\n
"
,
d
.
Name
,
q
.
KeysOnly
)
log
.
Printf
(
"%s: q.KeysOnly: %
v
\n
"
,
d
.
Name
,
q
.
KeysOnly
)
log
.
Printf
(
"%s: q.Filters: %d
\n
"
,
d
.
Name
,
len
(
q
.
Filters
))
log
.
Printf
(
"%s: q.Orders: %d
\n
"
,
d
.
Name
,
len
(
q
.
Orders
))
log
.
Printf
(
"%s: q.Offset: %d
\n
"
,
d
.
Name
,
q
.
Offset
)
...
...
coalesce/coalesce_test.go
View file @
8b5f0c5d
...
...
@@ -121,7 +121,7 @@ func TestCoalesceSameGet(t *testing.T) {
errs
<-
err
}
if
v
!=
"bar"
{
errs
<-
fmt
.
Errorf
(
"v is not bar"
,
v
)
errs
<-
fmt
.
Errorf
(
"v is not bar
: %v
"
,
v
)
}
done
<-
struct
{}{}
}()
...
...
@@ -133,7 +133,7 @@ func TestCoalesceSameGet(t *testing.T) {
errs
<-
err
}
if
v
!=
"baz"
{
errs
<-
fmt
.
Errorf
(
"v is not baz"
,
v
)
errs
<-
fmt
.
Errorf
(
"v is not baz
: %v
"
,
v
)
}
done
<-
struct
{}{}
}()
...
...
namespace/namespace.go
View file @
8b5f0c5d
package
namespace
import
(
"fmt"
ds
"github.com/ipfs/go-datastore"
ktds
"github.com/ipfs/go-datastore/keytransform"
dsq
"github.com/ipfs/go-datastore/query"
...
...
@@ -28,7 +26,6 @@ func PrefixTransform(prefix ds.Key) ktds.KeyTransform {
}
if
!
prefix
.
IsAncestorOf
(
k
)
{
fmt
.
Errorf
(
"Expected prefix (%s) in key (%s)"
,
prefix
,
k
)
panic
(
"expected prefix not found"
)
}
...
...
query/query.go
View file @
8b5f0c5d
...
...
@@ -227,7 +227,6 @@ func ResultsWithChan(q Query, res <-chan Result) Results {
}
}
}
return
})
go
b
.
Process
.
CloseAfterChildren
()
...
...
test/basic_tests.go
View file @
8b5f0c5d
...
...
@@ -159,7 +159,7 @@ func SubtestManyKeysAndQuery(t *testing.T, ds dstore.Datastore) {
for
i
,
s
:=
range
keystrs
{
if
outkeys
[
i
]
!=
s
{
t
.
Fatal
(
"in key output, got %s but expected %s"
,
outkeys
[
i
],
s
)
t
.
Fatal
f
(
"in key output, got %s but expected %s"
,
outkeys
[
i
],
s
)
}
}
...
...
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