Update xorm and dependencies vendor for feature to dump to other database (#565)

* update xorm and dependencies vendor for feature to dump to other database

* fix golint
This commit is contained in:
Lunny Xiao 2017-01-03 16:20:28 +08:00 committed by GitHub
parent 70900bd167
commit 980dd0bf51
54 changed files with 3135 additions and 2619 deletions

View file

@ -1,3 +1,7 @@
// Copyright 2016 The Xorm Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package builder
import "fmt"
@ -6,6 +10,7 @@ type condOr []Cond
var _ Cond = condOr{}
// Or sets OR conditions
func Or(conds ...Cond) Cond {
var result = make(condOr, 0, len(conds))
for _, cond := range conds {
@ -17,8 +22,9 @@ func Or(conds ...Cond) Cond {
return result
}
func (or condOr) WriteTo(w Writer) error {
for i, cond := range or {
// WriteTo implments Cond
func (o condOr) WriteTo(w Writer) error {
for i, cond := range o {
var needQuote bool
switch cond.(type) {
case condAnd:
@ -40,7 +46,7 @@ func (or condOr) WriteTo(w Writer) error {
fmt.Fprint(w, ")")
}
if i != len(or)-1 {
if i != len(o)-1 {
fmt.Fprint(w, " OR ")
}
}