mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-03 00:38:40 +08:00
fix golint issues (#533)
This commit is contained in:
parent
c4b2cddef7
commit
af531cf264
@ -52,6 +52,7 @@ func ToMap(in interface{}) map[string]interface{} {
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FieldNames returns field names from given in.
|
||||||
// deprecated: use RawFieldNames instead automatically while model generating after goctl version v1.1.0
|
// deprecated: use RawFieldNames instead automatically while model generating after goctl version v1.1.0
|
||||||
func FieldNames(in interface{}) []string {
|
func FieldNames(in interface{}) []string {
|
||||||
out := make([]string, 0)
|
out := make([]string, 0)
|
||||||
|
@ -128,7 +128,7 @@ func (j Join) Snake() Join {
|
|||||||
return join
|
return join
|
||||||
}
|
}
|
||||||
|
|
||||||
// Snake convert items into Untitle and return
|
// Untitle converts items into Untitle and return
|
||||||
func (j Join) Untitle() Join {
|
func (j Join) Untitle() Join {
|
||||||
var join Join
|
var join Join
|
||||||
for _, each := range j {
|
for _, each := range j {
|
||||||
|
@ -128,6 +128,7 @@ func (m *InformationSchemaModel) FindColumns(db, table string) (*ColumnData, err
|
|||||||
return &columnData, nil
|
return &columnData, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FindIndex finds index with given db, table and column.
|
||||||
func (m *InformationSchemaModel) FindIndex(db, table, column string) ([]*DbIndex, error) {
|
func (m *InformationSchemaModel) FindIndex(db, table, column string) ([]*DbIndex, error) {
|
||||||
querySql := `SELECT s.INDEX_NAME,s.NON_UNIQUE,s.SEQ_IN_INDEX from STATISTICS s WHERE s.TABLE_SCHEMA = ? and s.TABLE_NAME = ? and s.COLUMN_NAME = ?`
|
querySql := `SELECT s.INDEX_NAME,s.NON_UNIQUE,s.SEQ_IN_INDEX from STATISTICS s WHERE s.TABLE_SCHEMA = ? and s.TABLE_NAME = ? and s.COLUMN_NAME = ?`
|
||||||
var reply []*DbIndex
|
var reply []*DbIndex
|
||||||
|
Loading…
Reference in New Issue
Block a user