errors
errors copied to clipboard
IsAny() multi error support
Hello! At the moment the following code will produce the result "no". I suggest a fix based on the code found in the original method Is().
func main() {
err := errors.Join(io.EOF, errors.New("gopher"))
if errors.IsAny(err, io.EOF, net.ErrClosed) {
fmt.Print("yes")
} else {
fmt.Print("no")
}
}
@dhartunian Hi David. I see your latest activity in this repository and would like to ask if contributions are welcome and if someone can review the changes?
@nikitacrit thanks for the ping, I'll take a look when I get a chance, probably over the next few days.