feat:优化项目信息
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package lib
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewExcel(t *testing.T) {
|
||||
content := make([]interface{}, 0)
|
||||
@ -34,13 +36,17 @@ type Data struct {
|
||||
func TestNewExcelImport(t *testing.T) {
|
||||
excel := NewExcel()
|
||||
|
||||
err := excel.Import("测试.xlsx", 1)
|
||||
err := excel.Import("测试.xlsx", 1, 0)
|
||||
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
return
|
||||
}
|
||||
data := new(Data)
|
||||
excel.Analysis("", data)
|
||||
t.Log(data)
|
||||
data := excel.Analysis(&Data{})
|
||||
|
||||
for _, v := range data {
|
||||
_data, ok := v.(*Data)
|
||||
t.Log(ok)
|
||||
t.Log(_data.Name)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user