fix gofmt issues

This commit is contained in:
lqs 2020-12-28 22:20:17 +08:00
parent 9f85350cf8
commit 8834a4fefd
5 changed files with 4 additions and 5 deletions

View File

@ -53,4 +53,3 @@ func parseArgs(exampleDataSourceName string) (dataSourceName string, tableNames
return
}

View File

@ -119,6 +119,7 @@ func ensureIdentifier(name string) string {
return result
}
// Generate generates code for the given driverName.
func Generate(driverName string, exampleDataSourceName string) (string, error) {
dataSourceName, tableNames := parseArgs(exampleDataSourceName)

View File

@ -328,7 +328,7 @@ func (s selectStatus) Offset(offset int) selectWithOffset {
}
func (s selectStatus) Count() (count int, err error) {
if s.lastUnion == nil && len(s.base.groupBys) == 0 && s.limit == nil {
if s.lastUnion == nil && len(s.base.groupBys) == 0 && s.limit == nil {
if s.base.distinct {
fields := s.base.fields
s.base.distinct = false

View File

@ -2,8 +2,8 @@ package main
import (
"fmt"
_ "github.com/mattn/go-sqlite3"
"github.com/lqs/sqlingo/generator"
_ "github.com/mattn/go-sqlite3"
)
func main() {

View File

@ -59,9 +59,8 @@ func (s updateStatus) Set(field Field, value interface{}) updateWithSet {
func (s updateStatus) SetIf(condition bool, field Field, value interface{}) updateWithSet {
if condition {
return s.Set(field, value)
} else {
return s
}
return s
}
func (s updateStatus) Where(conditions ...BooleanExpression) updateWithWhere {