瀏覽代碼

fix golint issues (#533)

Kevin Wan 4 年之前
父節點
當前提交
af531cf264

+ 1 - 0
tools/goctl/model/sql/builderx/builder.go

@@ -52,6 +52,7 @@ func ToMap(in interface{}) map[string]interface{} {
 	return out
 }
 
+// FieldNames returns field names from given in.
 // deprecated: use RawFieldNames instead automatically while model generating after goctl version v1.1.0
 func FieldNames(in interface{}) []string {
 	out := make([]string, 0)

+ 1 - 1
tools/goctl/model/sql/gen/keys.go

@@ -128,7 +128,7 @@ func (j Join) Snake() Join {
 	return join
 }
 
-// Snake convert items into Untitle and return
+// Untitle converts items into Untitle and return
 func (j Join) Untitle() Join {
 	var join Join
 	for _, each := range j {

+ 1 - 0
tools/goctl/model/sql/model/informationschemamodel.go

@@ -128,6 +128,7 @@ func (m *InformationSchemaModel) FindColumns(db, table string) (*ColumnData, err
 	return &columnData, nil
 }
 
+// FindIndex finds index with given db, table and column.
 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 = ?`
 	var reply []*DbIndex