Skip to content

When Go 1.26 gets release, replace all calls to errors.As by calls to errors.AsType #644

@jub0bs

Description

@jub0bs

Go 1.26 will see the addition of function errors.AsType, which improves upon errors.As and should be preferred over the latter:

The new AsType function is a generic version of As. It is type-safe, faster, and, in most cases, easier to use.

Accordingly, when Go 1.26 gets released, all calls to errors.As should be replaced by calls to errors.AsType.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions