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
Hi! I'm migrating one of our projects from excelize v2.4.0 to v2.8.1 and can I not compile code:
cannot use xlsx (variable of type *excelize.File) as io.WriterTo value in return statement: *excelize.File does not implement io.WriterTo (wrong type for method WriteTo)
have WriteTo(io.Writer, ...excelize.Options) (int64, error)
want WriteTo(io.Writer) (int64, error)
I made a workaround returning *excelize.File instead of io.WriterTo, but anyway the issue (or the go doc comment) should be fixed, I think :)
Steps to reproduce the issue:
Create a method returning excelize.NewFile()
Make the return type as io.WriterTo
go build
Describe the results you received:
Code doesn't compile.
It is very unfortunate that fb1aab7 broke compatibilty with io.WriterTo (I was the one who introduced it in 2132de1) since v2.7.0.
However, at that point restoring the compatibility would be another another breaking change. So I don't think this is fixable. Except the documentation, of course.
Description
Hi! I'm migrating one of our projects from excelize v2.4.0 to v2.8.1 and can I not compile code:
I made a workaround returning
*excelize.File
instead ofio.WriterTo
, but anyway the issue (or the go doc comment) should be fixed, I think :)Steps to reproduce the issue:
excelize.NewFile()
io.WriterTo
Describe the results you received:
Code doesn't compile.
Describe the results you expected:
Code compiles.
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
MacOS Ventura 13.6.6
The text was updated successfully, but these errors were encountered: