Hi @galeone :)
And as always, thank you for the hard work and for keeping the lights on.
I was wondering if you think it is possible to reduce the number of panic calls in this repository?
Would it be okay if I send you PRs that would remove the calls to panic and instead return an error?
If you think that is a reasonable thing to do, I assume we might need a separate develop branch for a while since these will be breaking changes (I mean backward incompatible) due to the changes in the signature of these functions?
One example is
|
panic(fmt.Errorf("unsupported image extension %s", ext)) |
where
image.Read can return an error if the file extension is not recognized, rather than calling panic
Hi @galeone :)
And as always, thank you for the hard work and for keeping the lights on.
I was wondering if you think it is possible to reduce the number of
paniccalls in this repository?Would it be okay if I send you PRs that would remove the calls to panic and instead return an error?
If you think that is a reasonable thing to do, I assume we might need a separate
developbranch for a while since these will be breaking changes (I mean backward incompatible) due to the changes in the signature of these functions?One example is
tfgo/image/image.go
Line 74 in d89a5c7
where
image.Readcan return an error if the file extension is not recognized, rather than calling panic