On Mon, 2023-03-06 at 14:38 +1100, Nigel Tao wrote: > On Sun, Feb 26, 2023 at 12:43 PM 'Dan Kortschak' via golang-nuts > <golang-nuts@googlegroups.com> wrote: > > The alternative is to > > replicate the image.Decode functionality, including registration > > which > > seems ugly. > > It may seem ugly but that is what I'd recommend. > https://go.dev/src/image/format.go is only 110 lines of code.
Yeah, this is what I went with. > > Would a change to > > image.RegisterFormat that did a replacement of existing > registrations > > that are identical to a new registration rather than an append be > > entertained (I can see good reasons for a no here)? > > I'd be unlikely to entertain it, due to https://www.hyrumslaw.com/ Indeed. I think there are foot guns in the approach as well. Though it's been the way it is for years, it may be worth have a comment that registration for a type will only be effective once. thanks Dan -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/fae84889ed3a44f0f0e9c0fac3dd9a931305c354.camel%40kortschak.io.