From 93c981414750c44e6c478d389cfa34c13922448c Mon Sep 17 00:00:00 2001 From: kortschak Date: Thu, 21 Aug 2014 19:33:00 +0930 Subject: [PATCH] Quieten go vet in mongo --- graph/mongo/iterator.go | 6 +++--- graph/mongo/triplestore.go | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/graph/mongo/iterator.go b/graph/mongo/iterator.go index 3356974..78237ab 100644 --- a/graph/mongo/iterator.go +++ b/graph/mongo/iterator.go @@ -130,9 +130,9 @@ func (it *Iterator) Clone() graph.Iterator { func (it *Iterator) Next() bool { var result struct { - Id string "_id" - Added []int64 "Added" - Deleted []int64 "Deleted" + Id string `bson:"_id"` + Added []int64 `bson:"Added"` + Deleted []int64 `bson:"Deleted"` } found := it.iter.Next(&result) if !found { diff --git a/graph/mongo/triplestore.go b/graph/mongo/triplestore.go index 03c4c93..87adf7d 100644 --- a/graph/mongo/triplestore.go +++ b/graph/mongo/triplestore.go @@ -121,15 +121,15 @@ func (qs *TripleStore) convertStringToByteHash(s string) string { } type MongoNode struct { - Id string "_id" - Name string "Name" - Size int "Size" + Id string `bson:"_id"` + Name string `bson:"Name"` + Size int `bson:"Size"` } type MongoLogEntry struct { - LogID int64 "LogID" - Action string "Action" - Key string "Key" + LogID int64 `bson:"LogID"` + Action string `bson:"Action"` + Key string `bson:"Key"` Timestamp int64 } @@ -175,8 +175,8 @@ func (qs *TripleStore) updateQuad(q quad.Quad, id int64, proc graph.Procedure) e func (qs *TripleStore) checkValid(key string) bool { var indexEntry struct { - Added []int64 "Added" - Deleted []int64 "Deleted" + Added []int64 `bson:"Added"` + Deleted []int64 `bson:"Deleted"` } err := qs.db.C("quads").FindId(key).One(&indexEntry) if err == mgo.ErrNotFound {