Unverified Commit 8b5f0c5d authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #71 from ipfs/fix/go-tip

Fix warnings and errors on go-tip
parents 1be0c64e 20631b1c
......@@ -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)
......
......@@ -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{}{}
}()
......
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")
}
......
......@@ -227,7 +227,6 @@ func ResultsWithChan(q Query, res <-chan Result) Results {
}
}
}
return
})
go b.Process.CloseAfterChildren()
......
......@@ -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.Fatalf("in key output, got %s but expected %s", outkeys[i], s)
}
}
......
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