I've just been bitten by this behavior as well. It's very sad this can't be changed. I'd argue that the contract of Join() is only to return an error and that property will be maintained, but I realize this is a moot argument...
On Saturday, July 6, 2024 at 4:23:36 PM UTC+2 Ian Lance Taylor wrote: > On Sat, Jul 6, 2024 at 7:04 AM Andrei Rusakov <psih...@gmail.com> wrote: > > > > So, what do you think it makes sense for the function to return a > wrapped error even if it contains only one error? Wouldn't it be more > rational in such cases for Join to return that single error? > > Perhaps that would have made sense, but we can't make a change like > that now that errors.Join has its current behavior. > > Ian > -- 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 visit https://groups.google.com/d/msgid/golang-nuts/abcc631e-75bb-4dd8-8b89-4b39726ba654n%40googlegroups.com.