remove unnecessary space
This commit is contained in:
parent
f43c33d9a4
commit
7cc3bbdbf2
|
@ -147,12 +147,12 @@ func (col *Column) ValueOfV(dataStruct *reflect.Value) (*reflect.Value, error) {
|
||||||
}
|
}
|
||||||
fieldValue = fieldValue.Elem().FieldByName(fieldPath[i+1])
|
fieldValue = fieldValue.Elem().FieldByName(fieldPath[i+1])
|
||||||
} else {
|
} else {
|
||||||
return nil, fmt.Errorf("field %v is not valid", col.FieldName)
|
return nil, fmt.Errorf("field %v is not valid", col.FieldName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !fieldValue.IsValid() {
|
if !fieldValue.IsValid() {
|
||||||
return nil, fmt.Errorf("field %v is not valid", col.FieldName)
|
return nil, fmt.Errorf("field %v is not valid", col.FieldName)
|
||||||
}
|
}
|
||||||
|
|
||||||
return &fieldValue, nil
|
return &fieldValue, nil
|
||||||
|
|
2
table.go
2
table.go
|
@ -49,7 +49,6 @@ func NewTable(name string, t reflect.Type) *Table {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *Table) columnsByName(name string) []*Column {
|
func (table *Table) columnsByName(name string) []*Column {
|
||||||
|
|
||||||
n := len(name)
|
n := len(name)
|
||||||
|
|
||||||
for k := range table.columnsMap {
|
for k := range table.columnsMap {
|
||||||
|
@ -75,7 +74,6 @@ func (table *Table) GetColumn(name string) *Column {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *Table) GetColumnIdx(name string, idx int) *Column {
|
func (table *Table) GetColumnIdx(name string, idx int) *Column {
|
||||||
|
|
||||||
cols := table.columnsByName(name)
|
cols := table.columnsByName(name)
|
||||||
|
|
||||||
if cols != nil && idx < len(cols) {
|
if cols != nil && idx < len(cols) {
|
||||||
|
|
Loading…
Reference in New Issue