Back to Lo

Core Errorsas

docs/data/core-errorsas.md

1.53.0189 B
Original Source

A generic wrapper around errors.As that returns the typed error and a boolean indicating success.

go
if rateLimitErr, ok := lo.ErrorsAs[*RateLimitError](err); ok {
    // handle
}