-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
excelize.File does not implement io.WriterTo #1901
Comments
It is very unfortunate that fb1aab7 broke compatibilty with 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. |
Note that, as a workaround, it is easy to write your own wrapper to somewhat restore that compatibility: type myExcelizeFile = excelize.File
type myExcelizeWriterTo struct {
*myExcelizeFile
}
func (f myExcelizeWriterTo) WriteTo(w io.Writer) (int64, error) {
return f.myExcelizeFile.WriteTo(w)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: