forked from mirror/gorm
golint standard (#4421)
This commit is contained in:
parent
bcf2b385a4
commit
363f9b7863
|
@ -57,12 +57,12 @@ type StatementModifier interface {
|
||||||
ModifyStatement(*Statement)
|
ModifyStatement(*Statement)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write write string
|
// WriteString write string
|
||||||
func (stmt *Statement) WriteString(str string) (int, error) {
|
func (stmt *Statement) WriteString(str string) (int, error) {
|
||||||
return stmt.SQL.WriteString(str)
|
return stmt.SQL.WriteString(str)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write write string
|
// WriteByte write byte
|
||||||
func (stmt *Statement) WriteByte(c byte) error {
|
func (stmt *Statement) WriteByte(c byte) error {
|
||||||
return stmt.SQL.WriteByte(c)
|
return stmt.SQL.WriteByte(c)
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ func (stmt *Statement) Quote(field interface{}) string {
|
||||||
return builder.String()
|
return builder.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write write string
|
// AddVar add var
|
||||||
func (stmt *Statement) AddVar(writer clause.Writer, vars ...interface{}) {
|
func (stmt *Statement) AddVar(writer clause.Writer, vars ...interface{}) {
|
||||||
for idx, v := range vars {
|
for idx, v := range vars {
|
||||||
if idx > 0 {
|
if idx > 0 {
|
||||||
|
@ -506,7 +506,6 @@ func (stmt *Statement) clone() *Statement {
|
||||||
return newStmt
|
return newStmt
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helpers
|
|
||||||
// SetColumn set column's value
|
// SetColumn set column's value
|
||||||
// stmt.SetColumn("Name", "jinzhu") // Hooks Method
|
// stmt.SetColumn("Name", "jinzhu") // Hooks Method
|
||||||
// stmt.SetColumn("Name", "jinzhu", true) // Callbacks Method
|
// stmt.SetColumn("Name", "jinzhu", true) // Callbacks Method
|
||||||
|
|
Loading…
Reference in New Issue