Remove non-documentation lint

Because of extensive nature of changes, tested all three non-memstore
backends - passed.
This commit is contained in:
kortschak 2014-08-28 11:51:39 +09:30
parent 6614466d23
commit 484bf145a8
35 changed files with 277 additions and 284 deletions

View file

@ -140,7 +140,7 @@ func buildInOutIterator(obj *otto.Object, qs graph.QuadStore, base graph.Iterato
}
func buildIteratorTreeHelper(obj *otto.Object, qs graph.QuadStore, base graph.Iterator) graph.Iterator {
var it graph.Iterator = base
it := base
// TODO: Better error handling
var subIt graph.Iterator

View file

@ -112,9 +112,8 @@ func (wk *worker) toValueFunc(env *otto.Otto, obj *otto.Object, withTags bool) f
if err != nil {
glog.Error(err)
return otto.NullValue()
} else {
return val
}
return val
}
}
@ -260,9 +259,8 @@ func (wk *worker) send(r *Result) bool {
wk.count++
if wk.limit >= 0 && wk.limit == wk.count {
return false
} else {
return true
}
return true
}
return false
}

View file

@ -21,6 +21,7 @@ import (
"time"
"github.com/robertkrimen/otto"
// Provide underscore JS library.
_ "github.com/robertkrimen/otto/underscore"
"github.com/google/cayley/graph"
@ -176,7 +177,7 @@ func (s *Session) ToText(result interface{}) string {
tags := data.actualResults
tagKeys := make([]string, len(tags))
i := 0
for k, _ := range tags {
for k := range tags {
tagKeys[i] = k
i++
}
@ -203,7 +204,7 @@ func (s *Session) ToText(result interface{}) string {
}
// Web stuff
func (s *Session) BuildJson(result interface{}) {
func (s *Session) BuildJSON(result interface{}) {
data := result.(*Result)
if !data.metaresult {
if data.val == nil {
@ -211,7 +212,7 @@ func (s *Session) BuildJson(result interface{}) {
tags := data.actualResults
tagKeys := make([]string, len(tags))
i := 0
for k, _ := range tags {
for k := range tags {
tagKeys[i] = k
i++
}
@ -232,8 +233,8 @@ func (s *Session) BuildJson(result interface{}) {
}
}
func (s *Session) GetJson() ([]interface{}, error) {
defer s.ClearJson()
func (s *Session) GetJSON() ([]interface{}, error) {
defer s.ClearJSON()
if s.err != nil {
return nil, s.err
}
@ -245,6 +246,6 @@ func (s *Session) GetJson() ([]interface{}, error) {
}
}
func (s *Session) ClearJson() {
func (s *Session) ClearJSON() {
s.dataOutput = nil
}