Format code with gofmt
This commit is contained in:
parent
3d642c1987
commit
1fc176d679
2
scope.go
2
scope.go
@ -247,7 +247,7 @@ func (scope *Scope) Fields() []*Field {
|
|||||||
|
|
||||||
// Search for primary key tag identifier
|
// Search for primary key tag identifier
|
||||||
field.isPrimaryKey = scope.PrimaryKey() == field.DBName || fieldStruct.Tag.Get("primaryKey") != ""
|
field.isPrimaryKey = scope.PrimaryKey() == field.DBName || fieldStruct.Tag.Get("primaryKey") != ""
|
||||||
fmt.Printf("Name: %s\n isPrimaryKey: %v\n\n",field.DBName, field.isPrimaryKey)
|
fmt.Printf("Name: %s\n isPrimaryKey: %v\n\n", field.DBName, field.isPrimaryKey)
|
||||||
if field.isPrimaryKey {
|
if field.isPrimaryKey {
|
||||||
scope.primaryKey = field.DBName
|
scope.primaryKey = field.DBName
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,12 @@ import (
|
|||||||
"database/sql/driver"
|
"database/sql/driver"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"go/ast"
|
||||||
"reflect"
|
"reflect"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"go/ast"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (scope *Scope) primaryCondiation(value interface{}) string {
|
func (scope *Scope) primaryCondiation(value interface{}) string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user