Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Non standard return value of 'ok' in FromError() #180

@wiegell

Description

@wiegell

Normally you would expect ok to be true, if a type assertion is correct, see e.g.:
https://go.dev/tour/methods/15

However for the FromError method the return value is false, when the underlying type assertion is correct (from docs):
image
From source:
image

That's not intuitive and goes against what "ok" means in many other cases in go.
Changing this would ofc. be a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions