- remove debug info for Obj2Excel.
This commit is contained in:
@@ -56,7 +56,7 @@ func Obj2Excel(sheetList []*Obj2ExcelSheetConfig) []byte {
|
||||
mapData = valueInfo.Index(i).Interface().(map[string]interface{})
|
||||
}
|
||||
for index, name := range sheetConfig.CaptionList {
|
||||
globals.SugarLogger.Debug(sheetConfig.Title, " ", genAxis(i+1, index), " ", fmt.Sprintf("%v", mapData[name]))
|
||||
// globals.SugarLogger.Debug(sheetConfig.Title, " ", genAxis(i+1, index), " ", fmt.Sprintf("%v", mapData[name]))
|
||||
excelFile.SetCellStr(sheetConfig.Title, genAxis(i+1, index), fmt.Sprintf("%v", mapData[name]))
|
||||
}
|
||||
}
|
||||
@@ -66,15 +66,6 @@ func Obj2Excel(sheetList []*Obj2ExcelSheetConfig) []byte {
|
||||
return buf.Bytes()
|
||||
}
|
||||
|
||||
func getStructMemberNames(typeInfo reflect.Type) (nameList []string) {
|
||||
nameList = make([]string, typeInfo.NumField())
|
||||
for i := 0; i < typeInfo.NumField(); i++ {
|
||||
nameList[i] = typeInfo.Field(i).Name
|
||||
globals.SugarLogger.Debug(typeInfo.Field(i).Tag)
|
||||
}
|
||||
return nameList
|
||||
}
|
||||
|
||||
func genAxis(row, col int) string {
|
||||
return fmt.Sprintf("%c%d", col+65, row+1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user