You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce the issue:
1.使用streamWriter.SetRow(“A1”, []interface{}{"模板ID"})
2.go build 带参数-gcflag “-N”
3.构建excel
Describe the results you received:
panic: runtime error: slice bounds out of range [:5] with capacity 0 Describe the results you expected:
no panic Output of go version:
go version go1.13.9 darwin/amd64
Excelize version or commit ID:
lastest
Environment details (OS, Microsoft Excel™ version, physical, etc.):
mac OS 10.15.4 (19E287)
The text was updated successfully, but these errors were encountered:
Description
go build 加参数 -gcflag “-N”编译(debug时需要)
使用streamWriter.SetRow(cell, row)时
row中中英文混写(如"模板ID")会panic
研究了下原因
stringToBytes()使用了unssafe包, 在-gcflag “-N”参数下编译运行时会返回[]byte,len>0, cap=0,使用返回的slice时会panic
Steps to reproduce the issue:
1.使用streamWriter.SetRow(“A1”, []interface{}{"模板ID"})
2.go build 带参数-gcflag “-N”
3.构建excel
Describe the results you received:
panic: runtime error: slice bounds out of range [:5] with capacity 0
Describe the results you expected:
no panic
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
mac OS 10.15.4 (19E287)
The text was updated successfully, but these errors were encountered: